sgratzl / chartjs-chart-boxplot

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

Boxplot not working properly #7

Closed xde013 closed 3 years ago

xde013 commented 3 years ago

Chart type boxplot doesn't seem to behave as expected:

To Reproduce Please refer to this demo -> https://codesandbox.io/s/interesting-haze-i0421

Additional context

sgratzl commented 3 years ago

there seems to be some incompatibilities with chart.js 3.4.x if you go back to 3.3 it works as expected.

TearsDemon commented 3 years ago

As I can see problem in this code on Chart.js: https://github.com/chartjs/Chart.js/pull/9208

TearsDemon commented 3 years ago

Also I found a workaround for StatsBase https://github.com/sgratzl/chartjs-chart-boxplot/blob/4905cfd72c5def00b57424ba53f8aeef5ff52265/src/controllers/StatsBase.ts#L168

 this._transformStats(properties, parsed, (v) => (reset ? base : scale.getPixelForValue(v, index)));
 properties.height = undefiend;
 super.updateElement(rectangle, index, properties, mode);
sgratzl commented 3 years ago

should be fixed with https://github.com/sgratzl/chartjs-chart-boxplot/releases/tag/v3.5.0