Version
5.5.0
Link to Minimal Reproduction
Steps to Reproduce
1.list1是原始数据(其中最后一条数据的时间跨度比较大),list2只是把list1的最后一条数据删除,都使用同一个visualMap的pieces。第二张图就是相当于把数据拉的更开一些,观察两个图的区别。
2.截图中蓝框部分的数据我都设为红色。图二没问题,但是图一有明显的绿色。向下的线都是红色 红色跟红色叠加也不存在变成绿色。
Current Behavior
visualMap颜色不正确
Expected Behavior
visualMap颜色正确
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
5条答案
按热度按时间blmhpbnm1#
@GetemJay It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] The visualMap color is not used correctly when the line chart is data-intensive
h43kikqp2#
when visualMap dimension/pieces are by X-axis, vertical or near-vertical lines will have two colors (start, end). These two colors blend depending on pieces rules. Your upper chart example shows the blending effect more pronounced because many lines overlap. This is not a bug, since the API documentation does not elaborate on how blending is done and what results should be expected.
A suggestion for alternative coloring by Y-axis:
bnl4lu3b3#
when visualMap dimension/pieces are by X-axis, vertical or near-vertical lines will have two colors (start, end). These two colors blend depending on pieces rules. Your upper chart example shows the blending effect more pronounced because many lines overlap. This is not a bug, since the API documentation does not elaborate on how blending is done and what results should be expected. A suggestion for alternative coloring by Y-axis:
My requirement is to draw three lines: upper limit, lower limit, and actual value. When the actual value exceeds the upper or lower limit, the line needs to turn red. However, the upper and lower limits for each point are different, so it seems impossible to differentiate colors using the Y-axis.
ou6hu8tu4#
I had the same problem, but when I zoomed out the colors were correct.
bejyjqdl5#
I had the same problem, but when I zoomed out the colors were correct.
跟开启large并且数据点超出largeThreshold时 图表缩放尺寸或者缩放数据显示时会出现上面的问题;
设置large: false就好了