I am trying to get AxisX interval for MS Chart Control in code behind. But when i try to retrieve the value, it returns zero even though it has a default value.
'Doesn't return the correct value, only returns 0
Dim XInterval As Double = mainChart.ChartAreas(0).AxisX.Interval
'
'
'This allows me to set the value and works just fine, but I also need to get it first.
mainChart.ChartAreas(0).AxisX.Interval = 2000
According to the MSDN article on the Axis.Interval Property:
So, i you’re using the “default value” (auto), that would explain why you’re getting a zero back.