Change X or Y Axis Range

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
srinin2k
Posts: 25
Joined: Thu Jun 18, 2015 9:22 pm

Change X or Y Axis Range

Post by srinin2k » Mon Jun 22, 2015 10:56 pm

I have a requirement in which I need to change X or Y axis range dynamically. User provides minimum value, maximum value and an increment value. He can undo and can go back to original auto scaling mode also.

Questions
1) SetRange is working if I just want to change min and max values. How can I specify increment value?
2) Should I use custom axis ticks?
3) Should I call refresh code to repaint with new values at any time?

Thanks

ArctionJari

Re: Change X or Y Axis Range

Post by ArctionJari » Tue Jun 23, 2015 6:53 am

1) There's no increment value available. You can however play with axis' AutoDivSpacing, AutoDivSepearationPercent, Major/MinorDiv and Major/MinorDivCount properties but...
2) ... I think you may want to use custom axis ticks if you want to use exactly the same tick count as the increment value.
3) Um, not sure what you mean... Just set the properties between BeginUpdate and EndUpdate method calls and you should be fine. Chart updates itself on each property change so use those two methods if you set two ore more properties to avoid unnecessary rendering cycles.

Try the properties I mentioned with our WinForms demo application. Just select an example, go to Properties tab page and use the property grid to see how changing those properties make chart look. Very good tool to see instantly how different property values change the look of chart.

Post Reply