What problem does this feature solve?
I need constant color for series.itemStyle when using realtimeSort. Currently the color callback provide dataIndex for color picking. But it no params provide sorting info of data. I have to sort data manually before appling them to the bar chart. It makes realtimeSort useless for me.
What does the proposed API look like?
Add sortIndex
to the params of series.itemStyle.color callback. It shows us sorting index for the currently data.
4条答案
按热度按时间xdyibdwo1#
no params provide sorting info of data. I have to sort data manually before appling them to the bar chart
So you want to change items colors, instead of preserving them as in official example ?
Please make an effort to create Minimal Reproduction code.
ygya80vv2#
@helgasoft ,I make some changes to the example:
This always set specific color for the first and the second.
vq8itlhq3#
This always set specific color for the first and the second.
cannot replicate, sortIdx is null, I still do not understand what you are trying to accomplish
ifsvaxew4#
@helgasoft I want echarts to implement sortIdx which give me the current sorting info data in
realtimeSort: true
.For the official demo, in my case, the first and the second city should be always using gold and silver color. Other cities keeping using their colors.