1

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?

bashhike
  • 129
  • 1
  • 10

1 Answers1

0

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.

Gordon
  • 19,811
  • 4
  • 36
  • 74