chartjs-chart-boxplot icon indicating copy to clipboard operation
chartjs-chart-boxplot copied to clipboard

Time axis with Boxplot

Open stewmorg opened this issue 1 year ago • 1 comments

When I create a boxplot that has an X axis scale defined as : { type:'time' time: { unit: 'quarter', parser: 'YYYY-M', displayFormats: { quarter: '[Q]Q YYYY' } }, }

It seems like first tick drawn on the X axis is 1970. This seems to be the case whether or not the ticks.source is set to "labels" or "data".

image
  • Version: most recent versions of chartjs and boxplot plugin in angular 15 project.
  • Browser:

I'll see if I can get a codepen example working.

stewmorg avatar Jun 21 '24 08:06 stewmorg

@stewmorg Quick fix that I have found for this issue is to set options.scales.x.min and/or options.scales.x.suggestedMin. In the example you provided you can set it to "2019-01-01".

zqwitt avatar Jul 20 '24 04:07 zqwitt