In my STACKED_BAR chart, the values for the Y axis are always integers. I calculate the maximum value (ymax) and set the scale to YScaleMaxValue = max + 5, but the scale displays decimal values. How do I set the Y scale to display only integer values?
xChart1.NbYIntervals = 5
xChart1.YMaxValue = GetNextMultipleOfdiv(max1 + 2, 5) 'max1 - max value of range
Sub GetNextMultipleOfdiv(num As Float, div As Int) As Int
Dim intPart As Int = Floor(num)
' Find the next number divisible by div using ceiling division
Return (intPart + div - (intPart Mod div))
End Sub Sub
This is a solution.
There would probably be another possibility, but you have not answered my questions to give another advice. What are the value ranges, min max ?
Why do you not use automatic scales ?