sgratzl / chartjs-chart-boxplot

Chart.js Box Plots and Violin Plot Charts
https://www.sgratzl.com/chartjs-chart-boxplot/
MIT License
109 stars 25 forks source link

Time axis with Boxplot #139

Open stewmorg opened 4 months ago

stewmorg commented 4 months ago

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

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

zqwitt commented 4 months ago

@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".