If you'd like to view my modified ECharts option code, it can be found at this URL:
Alternatively, you can also access the code on codesandbox.io : https://codesandbox.io/s/apache-echarts-demo-forked-lxns3f?file=/index.js
I am aiming to color each line in a series based on their seriesIndex:
// prettier-ignore
const data = [["2000-06-05", 116], ["2000-06-06", 129], ... ]; // Sample data provided for context
// ECharts option with specified gradient line colors per seriesIndex
option = {
visualMap: {
type: 'piecewise',
top: 50,
right: 10,
pieces: [
{ max: 30000, min: 200, color: 'red', seriesIndex: [0] },
{ max: 200, min: 100, color: 'green', seriesIndex: [1] }
],
outOfRange: {
color: 'blue'
}
},
// Rest of the ECharts configuration...
};
It seems that all lines are being colored and not respecting the seriesIndex property. Have you encountered this issue with ECharts before? I have followed the documentation using visualMap.pieces.seriesIndex as shown here:
seriesIndex: [0] // or number
Every line within a series should have its own distinct color designated by the seriesIndex ID.