Page 1 of 1

Fixed grid, updating tick labels

Posted: Tue Sep 19, 2017 1:06 pm
by Claudio_G
Is there a way of having a fixed grid and updating the labels rather than a scrolling grid? I cannot find a setting to "freeze" the grid.

Claudio

Re: Fixed grid, updating tick labels

Posted: Wed Sep 20, 2017 8:05 am
by ArctionPasi
You can do that e.g. with following approaches:

1) Subscribe to axis.RangeChanged event handler, and set CustomAxisTicks in there. Set AutoFormatLabels = False, and CustomTicksEnabled = true.

2) Create secondary(extra) X and Y axis, and set their grid manually by setting AutoDivSpacing = False, and setting MajorDiv, and MajorDivCount. Also check KeepDivCountOnRangeChange property.
Attach your series to the primary axes, and set grid, labels, axis, ticks visibility to off. Update their ranges with data. Then chart will show static grid and scroll your data.
You can use FormatValueLabel event to give explicitly formatted strings for secondary axis tick labels.

Re: Fixed grid, updating tick labels

Posted: Wed Sep 20, 2017 9:40 am
by Claudio_G
Thanks, that is exactly what I was looking for.