dc.js sort ordinal line chart by y axis/value

前端 未结 3 1091
情话喂你
情话喂你 2020-12-10 20:04

I have a dc.js ordinal chart whose x-axis consists of things like \'Cosmetics\' and the y-axis is the number of sales. I want to sort the chart by sales decreasing, however

3条回答
  •  鱼传尺愫
    2020-12-10 20:42

    It does appear to be a bug. I too couldn't make it work as intended. I implemented a workaround; I added an example in a Plunker, link is (also) in the dc.js issue at github. It is based upon a recent snapshot of dc.js 2.0.0-dev. (So for now I guess this could be considered an answer)

    http://embed.plnkr.co/VItIQ4ZcW9abfzI13z64/

提交回复
热议问题