Hello,On my y axis, I am want to set the maxrange at 5 if the highest value is under 5.So if my highest value on my y axis is 2 therefore we would adjust the y axis to have the maxrange at 5.If the highest value isabove 5 then we do not do anything.Thanks
you could try setting Axis.Y.TickmarkStyle = AxisTickStyle.Smart, which chooses a nice looking range based on your data, but might not be specific enough to meet your requirements.
otherwise, you must use application code to detect the highest Y value and make the adjustments to the chart's RangeMin and RangeMax.
Thanks, but it is a little bit more complicated than that.I want to leave my axisrangeType in auto unless the highest Y value of my chart is below a specific value (5 for example).The Y axis must always start from 0.
So I would like to be able to detect what is the highest Y value and if the highest Y value is below 5 then I want to have my Y range max at 5 and not below.
Thanks
theChart.Axis.Y.RangeType = AxisRangeType.Custom;
theChart.Axis.Y.RangeMin = 0;
theChart.Axis.Y.RangeMax = 5;