Instead of specifying CSS styles with highchart options such as (fontWeight, fontColor, etc), is it possible to use CSS classes for styling the different elements of a chart?
In many cases (tooltip,labels) you can set useHTML as true, and then use CSS styles without !important or use formatter to define your own elements with CSS styles.
Example http://api.highcharts.com/highcharts#tooltip.useHTML
Yes, you have to use !Important
because it's the only way to override inline style
.
Your chart is render on some content which you have to pass it's id on chart.rendertTo
option.
So you can match the elements by your chart container, like.
#container text {
font-size: 14px !Important;
}
Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With