2👍
It seems like the library you’re using (chart.js) is overriding those css values by default.
One option is to set those values back to their correct values at the end of createChart function.
For example:
tempChart.style.width = 45%;
Other option is add a high power to them in a stylesheet, !important
, but this depends on the way (chart.js) is acting.
- [Chartjs]-Is it possible to change pointStyle for elements of a ChartJS bubble chart per dataset?
- [Chartjs]-Chart.JS – Polar area – Legend hover style and margin
Source:stackexchange.com