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 want to add some new lines to my chart dynamically and am using MVVM
I can see how to add my lines to the chart series, but am unsure how to add the various YAxis etc
From the code below, you can see I have passed a reference to my SciChartSurface to the Viewmodel at construction, and by using this I can dynamically add a Yaxis (R3), but now need to and YAxisDragModifier to the axis but am not sure how to do this? Is there any better documentation than the Class Library Documentation or better examples on MVVM that I have not found that shows dynamic adding of lines, axis etc, or could you help me get this going please?
NumericAxis na = new NumericAxis(); na.VisibleRange = new DoubleRange(0, 500); na.AxisAlignment = AxisAlignment.Right; na.Id = "R3"; sciChart.YAxes.Add(na); YAxisDragModifier ydm = new YAxisDragModifier(); ydm.YAxisId ="R3"; // How do I add this now???????