Fixed grid, updating tick labels

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Claudio_G
Posts: 13
Joined: Fri Sep 15, 2017 7:28 am

Fixed grid, updating tick labels

Post by Claudio_G » Tue Sep 19, 2017 1:06 pm

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

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Fixed grid, updating tick labels

Post by ArctionPasi » Wed Sep 20, 2017 8:05 am

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.
LightningChart Support Team, PT

Claudio_G
Posts: 13
Joined: Fri Sep 15, 2017 7:28 am

Re: Fixed grid, updating tick labels

Post by Claudio_G » Wed Sep 20, 2017 9:40 am

Thanks, that is exactly what I was looking for.

Post Reply