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 didn't found anything in docs about how to set minimal value on Y axis (to not start from 0), nothing on github and nothing on CoPilot bing, Copilot Github, Chat GPT.
So I started to typing anything and I've found out that this is easy way to achieve that. So easiest way is on creating lineChartOptions just set Scales = null
If you want to set minimal value (like 100 or something) you can achieve it using scales object from this method: private void SetMinYAxisValue(double minVal) { scales = new Scales() { Y = new ChartAxes() { Min = minVal } }; }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I didn't found anything in docs about how to set minimal value on Y axis (to not start from 0), nothing on github and nothing on CoPilot bing, Copilot Github, Chat GPT.
So I started to typing anything and I've found out that this is easy way to achieve that. So easiest way is on creating lineChartOptions just set Scales = null
If you want to set minimal value (like 100 or something) you can achieve it using scales object from this method:
private void SetMinYAxisValue(double minVal) { scales = new Scales() { Y = new ChartAxes() { Min = minVal } }; }
And then use it like this:
lineChartOptions = new() { Responsive = true, Interaction = new Interaction { Mode = InteractionMode.Index } , Scales = scales };
I know it's nothing special but maybe someone will have same problem as I had and will find resolution here :)
Beta Was this translation helpful? Give feedback.
All reactions