1
votes

Hi I am ordering the x values in my bar chart with .ordering. It orders correctly. However on filtering on other linked charts the ordering doesn't change. How do I achieve this behaviour?

Also ordering for me only works when I am overriding the default groupX.all() function with

groupX.all = function() {
  return groupX.top(Infinity);
}

How can I make my bar chart order itself everytime it's redrawn?

1
I have no idea about the all override, seems like it should work without that.Gordon
I am now using 2.0.0-beta.27 version. It works without the override. Thanks.bashhike

1 Answers

0
votes

How about this (untested):

chart.on('preRedraw', function() {
    chart.rescale();
});

Since the ordering is implemented via the X scale, this should get the chart to recompute the scale each time.