Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

Unable to create floating stacked horizontal bar chart

Open SpudManTwo opened this issue 1 year ago • 0 comments

Describe the bug I'm trying to create a floating stacked horizontal bar chart and I can get everything to render fine when the bars are vertical instead of horizontal. However, changing the BarChartOption of IndexAxis to "y" causes the chart to render but without any bars or data displayed. I saw this was an issue previously before HorizontalBarChart was removed, and I'm unsure if this has came back or if there is a hidden setting I'm missing? The chart is drawing all the labels correctly along the Y-Axis and shows tick markers that would be for linear data on the X-Axis, so I'm not sure what exactly is going on. I've included two screenshots of what I'm working with. The first is what happens when I include the IndexAxis = "y" argument and the second is what happens when I omit the argument.

The exact BarChartOptions object I'm using is the following:

private BarChartOptions Options() => new BarChartOptions() { IndexAxis = "y", Responsive = true, Scales = new () { X = new () { Stacked = true, }, Y = new () { BeginAtZero = false, Stacked = false, } } };

Screenshots image image

SpudManTwo avatar Aug 03 '22 16:08 SpudManTwo