You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add basic options to the chart, but when I try to use the chart I received Call to undefined method marineusde\LarapexCharts\Charts\LineChart::setOptions()
Here's my most basic example
use marineusde\LarapexCharts\Charts\LineChart AS OriginalLineChart;
class AverageTimeOnMarketChart
{
public function build(): OriginalLineChart
{
$options = [
'yaxis' => [
'decimalsInFloat' => 0,
]
];
return (new OriginalLineChart)
->setXAxis(['January'])
->addData('Time on Market', ['10'])
->setOptions($options)
;
}
}
The only way I can get options to work is if I edit the LarapexChart.phpgetDefaultOptions() directly.
The text was updated successfully, but these errors were encountered:
I fixed it some weeks ago, but didnt publish a release, sorry.
You can do it in 1.3.2 with the method "setAdditionalOptions":
use marineusde\LarapexCharts\Charts\LineChart AS OriginalLineChart;
class AverageTimeOnMarketChart
{
public function build(): OriginalLineChart
{
$options = [
'yaxis' => [
'decimalsInFloat' => 0,
]
];
return (new OriginalLineChart)
->setXAxis(['January'])
->addData('Time on Market', ['10'])
->setAdditionalOptions($options)
;
}
}
Continuing from this thread.
I am trying to add basic options to the chart, but when I try to use the chart I received
Call to undefined method marineusde\LarapexCharts\Charts\LineChart::setOptions()
Here's my most basic example
The only way I can get options to work is if I edit the
LarapexChart.php
getDefaultOptions()
directly.The text was updated successfully, but these errors were encountered: