Highcharts Styled Mode - no other way to use CSS?

I am using Highcharts v5 in style mode.

In normal mode, you can specify the color of the chart with the color attribute:

series: [{
    data: [...],
    name: "mySeries",
    color: '#FF0000'
}]

      

In style mode, you must specify the color colorIndex ...

series: [{
    data: [...],
    name: "mySeries",
    colorIndex: 2
}]

      

... and in css you need to specify a color for colorIndex.

.highcharts-color-2 {
    fill: #8E44AD;
    stroke: #8E44AD;
}

      

Is there any way, in style mode, I can set the color from its hex code directly, without having to implement the css class first?

+3


source to share





All Articles