Open ajay-patidar opened 6 years ago
How to use plotLines under Y-axis for plot average lines
plotLines: [{ color: 'red', value: '81.5', // Insert your average here width: '1', zIndex: 2 // To not get stuck below the regular plot lines }]
I have added this by two ways below
$chart->pushSubset('yAxis', function($title){ $title->pushCriteria(new Criterias\Max(100)); $title->pushCriteria(new Criterias\Min(0)); $title->pushCriteria(new Criterias\TickInterval(10)); $title->pushSubset('plotLines', function($plotLines){ $plotLines->pushCriteria(new Criterias\Color('red')); $plotLines->pushCriteria(new Criterias\Value(80)); $plotLines->pushCriteria(new Criterias\Width(1)); $plotLines->pushCriteria(new Criterias\ZIndex(2)); }); });
OR
$chart->pushSubset('plotLines', function($plotLines){ $plotLines->pushCriteria(new Criterias\Color('red')); $plotLines->pushCriteria(new Criterias\Value(80)); $plotLines->pushCriteria(new Criterias\Width(1)); $plotLines->pushCriteria(new Criterias\ZIndex(2)); });
But Its creating object of plotline
plotLines: { color: 'red', value: '81.5', // Insert your average here width: '1', zIndex: 2 // To not get stuck below the regular plot lines }
I need to create it as a array.
Please help me.
Thanks
Sorry, it is not currently possible :( Maybe in a next version
How to use plotLines under Y-axis for plot average lines
I have added this by two ways below
OR
But Its creating object of plotline
I need to create it as a array.
Please help me.
Thanks