To give a user some control over the number of gridlines of a DateTimeAxis, I gave the user control over the “MaxAutoTicks”. Works well, except that not all possible MaxAutoTicks settings have an effect on the number of shown major gridlines.
Is there a way to get the number of gridlines ( or the delta ) actually being drawn on the chart? I want to filter out all “MaxAutoTicks” values that have no effect on the amount of grid lines drawn.
I thought about using the DeltaCalculator,with different MaxAutoTicks, to calculate the delta and use that to determine which MaxAutoTicks have an effect on the number of gridlines drawn. Unfortunate I did not see a way to do this without the need to override the DateTimeAxis class to get public access( or a binding) to GetDeltaCalculator.
- _ _ asked 8 years ago
- You must login to post comments
Yes, I am also aware of the provider and deltacalculator. I tried to avoid this because the default date DeltaCalculator seems is good (enough). I didn’t want to reinvent the wheel that does almost the same thing as the date DeltaCalculator.
Currently I have an up/down ticker to set the “MaxTicks” so the user the some control over the delta, but many of the possible values have no effect. All I need is a way to figure out which of the possible MaxTicks value would have an effect on the calculate delta for a date axis. I thought about calling the DateDeltaCalculator myself, but the implementation does not seem to be publicly accessible.
- _ _ answered 8 years ago
-
Could you simply inherit our DeltaCalculator and notify the ViewModel or your code what the calculated values are? Would this solve the problem? I just noticed you can’t because DeltaCalculator is internal. If we made it public so you could instantiate one and get the calculated values out, would this help?
-
Yes, I think that would solve my problem. That probably means I have to upgrade to SciChart v4. I have to look into that. Requires some work on my side with the new MVVM interface and the RenderableSeries being deprecated.
-
For now this is no longer necessary. It has unwanted side effects for the user. Thanks anyway.
-
For some reason I was completely focussed on the DeltaProvider. It seems i could have used the TickProvider to get the actual number and the exact positions of the ticks, but it’s no longer necessary.
- You must login to post comments
Hi Steffam,
It sounds like you’re aware of DeltaCalculator and MaxAutoTicks, but are you aware of our TickProvider / DeltaCalculator API documentation?
There is a walkthrough there on creating your own to have full control over the axis tick and gridlines.
Does that help?
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Please login first to submit.