Pre loader

Custom Gridlines

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi, guys

My x axis is SCICategoryDateTimeAxis and i’m want to draw grid line with custom period. Let’s say every four hours for data with a period of thirty minutes. What is the best way for that?

Can i redifined axis’s tickCoordinatesProvider?
Can you provide some example?
Or it only possible with axes annotations ?

Best regards,
Sushynski Andrei

Version
2.0.0.xxxx
  • You must to post comments
0
0

Hi, Andrei

You should set autoTicks into false and set major delta. Major delta is a difference beetween two major grid lines. But in category axis it’s value should be set in indecies. For example your data has new value every one minute so you should set major delta into 30, and then you have period between two grid lines 30 minutes.

sciChartView1.xAxes.add(SCICategoryDateTimeAxis())
sciChartView1.xAxes.item(at: 0).axisId = “xID”
sciChartView1.xAxes.item(at: 0).autoTicks = false
sciChartView1.xAxes.item(at: 0).majorDelta = SCIGeneric(30)

Best Regards, Mykola

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.