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

Sample datalimits does not work as intended #25

Closed jasondilworth56 closed 2 years ago

jasondilworth56 commented 2 years ago

I have cloned and built this repo and tried to use the minStats options as described in the config section of the readme, but get an error of Cannot read properties of undefined (reading 'datasets').

I have tried to amend the code to change minStats and maxStats on the datasets themselves, or by setting the initial values for them within options.boxplot.datasets instead of directly within options.

To Reproduce

  1. Clone repo and build
  2. Open datalimits.html within the samples folder
  3. Click Limit to whiskers
  4. Check console for errors

Expected behavior

A change in the scales of the chart to be limited to the whiskers of the boxplot.

sgratzl commented 2 years ago

I fixed the example, the configuration option is correct:

https://github.com/sgratzl/chartjs-chart-boxplot/blob/5add9a5cd881dc632990c10b3268e5fb0af34c4d/samples/datalimits.html#L43-L54

jasondilworth56 commented 2 years ago

Thanks Samuel, especially for how quick that was. I was sure I'd tried that option, but clearly not. Appreciate your help 👍