3 Commits
2.0.0 ... 2.1.0

Author SHA1 Message Date
Andrés Santibáñez
230b706c63 Merge pull request #11 from hamidafghan/ifix-stroke-width
Added stroke width customization
2020-11-30 12:59:20 -05:00
Andrés Santibáñez
8b0bb9c250 Added custom stroke for Area Chart 2020-11-30 12:58:19 -05:00
hamidafghan
c61ca90905 Add stroke width 2020-11-24 10:36:09 +04:30
3 changed files with 11 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -53,9 +53,7 @@ const areaChart = () => {
colors: [component.get('areaChartModel.color') || '#2E93fA'],
stroke: {
curve: 'straight'
},
stroke: component.get('areaChartModel.stroke') || {},
title: {
text: title,

View File

@@ -7,6 +7,7 @@ namespace Asantibanez\LivewireCharts\Models;
trait HasStroke
{
private $stroke;
private $width;
public function initStroke()
{
@@ -17,6 +18,7 @@ trait HasStroke
{
return [
'curve' => 'straight',
'width' => 4
];
}
@@ -34,6 +36,13 @@ trait HasStroke
return $this;
}
public function setStrokeWidth($width)
{
data_set($this->stroke, 'width', $width);
return $this;
}
protected function strokeToArray()
{
return [