Specific series color

Specify the color of a series

You may want to specify the color of a series in the series itself, regardless of its index. This can happen if the number of series displayed changes but, for a specific type of data, you want to keep the same color regardless of the series' place in the list of series to be displayed. This means that the ordered list of colors to use will change according to the series displayed.

To freeze the color of a series, Apache ECharts provides the itemStyle.color option, which can be added to the series definition like this:

series: [
...
{
  ...
  itemStyle: {
    color: '#50be87'
  }
}
              

Title

Sub-Title