You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue with the HorizontalBarChart, where all of the values were under 10. This caused none of the bars to render.
Context:
I wanted to display all orders per hour over a 24 hour period.
InputData="0,0,0,0,0,0,0,0,0,0,0,1,0,2,1,1,7,0,0,0,0,0,0,0"
As none of the values were over 10, it had the effect that none of the horizontal bars would render.
I fixed it with the following change to the HorizontalBarCharts.cs
//Check the highest value in inputDataArr, if below 10, set the gridYUnits and gridXUnits to 1
var units = (inputDataArrDouble.Length > 0 && inputDataArrDouble.Max() < 10) ? 1 : 10;
double gridYUnits = units; //old value was hardcode to 10
double gridXUnits = units; //old value was hardcode to 10
It works fine for my needs.
Thanks for creating these charts. They are simple and easy to use.
The text was updated successfully, but these errors were encountered:
I had an issue with the HorizontalBarChart, where all of the values were under 10. This caused none of the bars to render.
Context:
I wanted to display all orders per hour over a 24 hour period.
InputData="0,0,0,0,0,0,0,0,0,0,0,1,0,2,1,1,7,0,0,0,0,0,0,0"
As none of the values were over 10, it had the effect that none of the horizontal bars would render.
I fixed it with the following change to the HorizontalBarCharts.cs
//Check the highest value in inputDataArr, if below 10, set the gridYUnits and gridXUnits to 1
var units = (inputDataArrDouble.Length > 0 && inputDataArrDouble.Max() < 10) ? 1 : 10;
double gridYUnits = units; //old value was hardcode to 10
double gridXUnits = units; //old value was hardcode to 10
It works fine for my needs.
Thanks for creating these charts. They are simple and easy to use.
The text was updated successfully, but these errors were encountered: