Change label in getNovaChartjsSettings()
Hey, first at all: Thank you for this awesome tool! It's really beautiful and works without any problems. But I'm having trouble in changing the label of my default chart. Is there an option to put the label field inside the getNovaChartjsSettings like this:
return [
'type' => 'line',
'titleProp' => 'id',
'identProp' => 'id',
'label' => 'TESTLABEL',
'height' => 400,
'indexColor' => '#999999',
'color' => '#FF0000',
'parameters' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
'options' => ['responsive' => true, 'maintainAspectRatio' => false],
];
Would be very nice if this is possible.
Thanks!
Hi,
Thank you for your interest in Nova ChartJS.
You can pass label for your chart directly from within the Nova Resource. Please have a look at https://github.com/kirschbaum-development/nova-chartjs#adding-chart for details about adding a title to your chart in both panel and inline mode.
Thanks!