echarts 堆叠柱状图排序问题

yks3o0rb  于 2022-10-23  发布在  Echarts
关注(0)|答案(4)|浏览(421)

堆叠柱状图每个柱子内部怎么根据数据排序,而不是默认采用图例的顺序?

One-line summary [问题简述]

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {

}

Other comments [其他信息]

kxxlusnw

kxxlusnw1#

可以传入前先将数据排序好

raogr8fs

raogr8fs2#

Order the data first indeed solves this problem.
However, this solution would also change the order of legend, and the order of tooltip.
Have a option to reverse the stack order would be helpful.

sh7euo9m

sh7euo9m3#

这个图设计有问题啊,好多人问这个。

bybem2ql

bybem2ql4#

现在有解决方案了吗

相关问题