sgratzl / chartjs-chart-funnel

Chart.js Funnel chart
http://www.sgratzl.com/chartjs-chart-funnel/
MIT License
16 stars 10 forks source link

Funnel is horizontal rather than expected vertical #23

Closed ultimate-tester closed 1 year ago

ultimate-tester commented 1 year ago

Just out of the box using the sample code from the README, the funnel is draw horizontally (left to right) instead of vertically (top to bottom) as I expected. I am not sure if this is a bug or a feature and I should manually force a rotation onto it, but I didn't see that mentioned in the README so I thought I'd check.

To Reproduce

  1. Create the chart with the sample code from the README.
  2. Chart is now drawn horziontally, from left to right.
  3. This is also seen at the examples: https://www.sgratzl.com/chartjs-chart-funnel/examples/align.html

Expected behavior Chart is drawn vertically, from top to bottom.

EDIT: Setting options.indexAxis: 'y' fixes this behavior. If this is as intended, then it might be a nice addition to the docs.

sgratzl commented 1 year ago

Create the chart with the sample code from the README.

which code are you referring to the README just contains a hint with respect to tree shaking the basic example is in https://www.sgratzl.com/chartjs-chart-funnel/examples/