Skip to content

Commit

Permalink
refactor: add data set option for line tension
Browse files Browse the repository at this point in the history
Controls the curve ratio for line charts. Line tension of 0
results in straight lines.
  • Loading branch information
gwynbox committed Feb 26, 2024
1 parent ef33a98 commit 8134c8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/BaseDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ abstract class BaseDataset extends \yii\base\Component
*/
public $stack = null;

/**
* @var int
*/
public $lineTension = 0;

/**
* Populates `$this->data` manipulating a query row into the correct format
* for the dataset format use are using
Expand Down Expand Up @@ -219,6 +224,8 @@ public function getDataset()
$dataset['stack'] = $this->stack;
}

$dataset['lineTension'] = $this->lineTension;

return $dataset;
}

Expand Down

0 comments on commit 8134c8d

Please sign in to comment.