Hi there,
Would it be possible to add the ability to set a vertical or horizontal gradient (start/end) background color to chartjs?
As far as I can see, it only supports a solid backcolor.
Thank you
Darren
Yes but you have to do it using a css class.
Example of css class text to set on the StyleSheet:
“.gradient {background: linear-gradient(red, yellow);}”
Then set the CssClass property to “gradient” (without the dot).
https://www.w3schools.com/css/css3_gradients.asp
You can set the gradient style in a css file and add it to Default.html like any css file. Looks like a class you can use is “.chartjs-render-monitor”. You can find out by inspecting the html with chrome and F12.
.chartjs-render-monitor {
background-color: red;
}
This will apply to all chartjs widgets.
The delay between the display of the element and the chart is normal. It has to receive the data. There may be ways to draw the chart after the data is received, but it requires changing the javascript initialization. The chartjs extension is open source so it can be modified and adapted to best fit the project.
Please login first to submit.