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'], colors: [component.get('areaChartModel.color') || '#2E93fA'],
stroke: { stroke: component.get('areaChartModel.stroke') || {},
curve: 'straight'
},
title: { title: {
text: title, text: title,

View File

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