nova-chartjs icon indicating copy to clipboard operation
nova-chartjs copied to clipboard

Change label in getNovaChartjsSettings()

Open seoanalyze opened this issue 7 years ago • 2 comments

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!

seoanalyze avatar Aug 12 '19 15:08 seoanalyze

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.

navneetrai avatar Aug 12 '19 15:08 navneetrai

Thanks!

seoanalyze avatar Aug 14 '19 10:08 seoanalyze