php - Chartjs with Symfony UX (problem about x/yAxes)Get the solution ↓↓↓
I'm struggling with Symfony UX and chartjs, I try to show dynamic data on a graph which the "x" is time,
I write this on my controller in order to make a graph :
$chart->setOptions([ 'scales' => [ 'yAxes' => ['ticks' => ['min' => 0, 'max' => round(max($otherDataAgreg) + $ScaleCoef * max($otherDataAgreg))], ], 'xAxes' => [ 'type' => 'time', 'time' => ['unit' => 'month'] ] ] ]);
When i just try the first part with the "yAxes", it works and my graph scale is ok, but when I add the second part for the "xAxes", this delete the yAxes scale and doesn't sort the xAxes by month.
If someone has an idea, it will be miraculous !
People are also looking for solutions of the problem: composer detected issues in your platform: your composer dependencies require a php version ">= 8.0.2".
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.