Webcharts icon indicating copy to clipboard operation
Webcharts copied to clipboard

Allow explicit domains on ordinal axes

Open jwildfire opened this issue 7 years ago • 0 comments

The following settings:

x: {
  type: 'ordinal',
  domain: ["Scrn", "D1", "D4", "D8", "D29", "D32", "D36", "D50", "D121", "D212", "D394"],
  ...
}

only gives a chart showing bars for the current data, and can ignore several of the specified domain levels if data is sparse:

screen shot 2017-09-22 at 7 16 08 am

But, this simple callback:

        chart.on('init', function() {
            chart.config.x.domain= ["Scrn", "D1", "D4", "D8", "D29", "D32", "D36", "D50", "D121", "D212", "D394"]
        });

gives the desired behavior:

screen shot 2017-09-22 at 7 19 12 am

jwildfire avatar Sep 22 '17 14:09 jwildfire