sgratzl / chartjs-chart-boxplot

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

Controlling the width / thickness of the boxplot #94

Closed ajyang818 closed 5 months ago

ajyang818 commented 7 months ago

Is it possible to control how "thick" the boxplot is, ie its width?

Here's a screenshot of what I have so far: image

This is a horizontal boxplot, so what I'm trying to reduce is how 'tall' the box is in the vertical direction.

Here's a Codepen that's pretty close to what I'm doing right now: https://codepen.io/Allen-Yang-the-reactor/pen/poGOpxW

sgratzl commented 5 months ago

you should be able to use the same properties as when changing the width of a categorical scale in chart.js, e.g. https://www.chartjs.org/docs/latest/charts/bar.html#barthickness

ajyang818 commented 5 months ago

That does it - thanks!