Version
5.1.1
Steps to reproduce
visualMap: [
{
type: 'piecewise',
seriesIndex: 0,
categories: ["R1-R1", "R1-R2", "R1-R4", "R2-R2", "R2-R4", "R4-R4"],
// categories: [1, 2, 3, 4, 5, 6],
inRange: {
color: ['rgb(102,194,165)','rgb(252,141,98)','rgb(166,216,84)','rgb(141,160,203)','rgb(231,138,195)','rgb(255,217,47)'],
},
},
]
My line data:
coords: [
[line[1], line[0]],
[line[3], line[2]]
],
value: line['LinkType'],
What is expected?
Lines with different types should display different colors.
What is actually happening?
The lines are transparent. However, If I change the line data item 'LinkType' from string to int, like [1, 2, 3, 4 ,5, 6], this code could work. It seems echarts could only recognize the int type, but the string type. I don't know am I right or wrong. Or could this be improved?
Version
5.1.1
Steps to reproduce
My line data:
What is expected?
Lines with different types should display different colors.
What is actually happening?
The lines are transparent. However, If I change the line data item 'LinkType' from
stringtoint, like [1, 2, 3, 4 ,5, 6], this code could work. It seems echarts could only recognize theinttype, but thestringtype. I don't know am I right or wrong. Or could this be improved?