Allow styles to be defined in CSS
An example of why this is needed is mobile and desktop version of the same page. We would use different CSS to make font bigger on mobile devices. Another example - print version of the page. We would use "@media print" CSS rule to define printer-friendly styles and want charts to inherit these styles.
It would be great if your charts supported styling through CSS. To be more specific, it would be great if I could define all styles in CSS including series colors, font family, size, color and etc.
This is implemented in Highcharts 5, see http://www.highcharts.com/docs/chart-design-and-style/style-by-css
I've blogged about it at the following link:
Just wondering if there's been any movement on this request?
I have just come across this whilst trying to search for the exact same functionality
The VML problem is understandable, but how long will support for VML really be necessary? True CSS support is really the only significant flaw I see in an otherwise great product.
Maybe some kind of flag config option: "useCSS" could automatically disable all programatically applied styles and instead attach an appropriate class to each element so they can be targeted with CSS.
> you cannot create common set of styles for your page that includes charts
You can use a Highcharts theme. See http://api.highcharts.com/highcharts#Highcharts.setOptions()
It solves the problem of shared design between all charts in the page, and even separate mobile styles. But not print styles.
We are constantly considering improvements, including true CSS support. One problem is that the CSS would have to be programmatically parsed by Highcharts and converted to VML-compatible CSS or attributes for the VML browsers.