SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I need to accomplish the next scenario:
i have a real time financial graph that looks like the one in the attached screenshot.
The captured position of the graph is perfect, it has 4 ticks and the series is positioned in the middle.
i have done this by defining the following YAxis:
YAxis = new NumericAxis
AutoTicks = true,
MaxAutoTicks = 4,
Id = "YAxisID",
TextFormatting = "#.######",
TickTextBrush = Brushes.White,
BorderBrush = Brushes.Black,
AxisTitle = "Rates",
AxisAlignment = AxisAlignment.Left,
DrawMajorGridLines = true,
DrawMinorGridLines = false,
BorderThickness = new Thickness(2, 2, 2, 2),
//MinorDelta = 0.00001,
//MajorDelta = 0.0001,
AutoRange = true,
AutoAlignVisibleRange = true,
GrowBy = new DoubleRange(2, 2)
now, the problem is that i have MaxAutoTicks set to 4, but because the chart is dynamic and changes dynamically from a delta of 0.0001 to 0.001 (for example), the number of ticks always changes from 1 to 4 and the chart is zooming in and out…
what i need is to set the number of ticks to a fixed number of 4 and that the series will always be in the middle as in the screenshot and not zoomed in and out all the time – the only thing that can be changed are the values of the ticks of the Y axis…is that possible to accomplish?
I would suggest using fixed VisibleRange for YAxis. You should set AutoRange = False, VisibleRange = new DoubleRange(DesiredMin, DesiredMax).
Please, try this approach and let us know if it solves your problem.
Please login first to submit.