Hi,
Can I use NumericAxis as XAxis with SciStockChart?
Thanks,
Arthur
- Arthur Romanov asked 11 years ago
- You must login to post comments
Hi there,
You could try to do a following (modified “Create a Stock Chart” example):
public CreateSimpleStockChart() { InitializeComponent(); stockChart.XAxis = null; stockChart.XAxis = new NumericAxis(); var binding = new Binding("VisibleRange") { Source = stockChart.XAxis }; stockChart.SetBinding(SciStockChart.XAxisVisibleRangeProperty, binding); }
Please, feel free to ask if you have any more questions!
Best regards,
Yuriy
- Yuriy Zadereckiy answered 11 years ago
-
Hi Yuriy, And after that, if I can use XAxis in SciStockChart as NumericAxis, then, what is the difference between SciStockChart and SciChartSurface? Thanks, Arthur
-
Hi Arthur, SciStockChart is just an awesome easy way to create SciChartSurface - you don't need to set and configure Axes, Modifiers and surface by yourself. If you take a look at SciStockChart default style, you will see, that it is just properly configured SciChartSurface with additional properties, which simplify access to their analogs in SciChartSurface. So there is no significant differences - you can do all the things in SciChartSurface as well. Best regards, Yuriy
-
Thank you Yuriy, One more question. I have SciStockChart with multiple YAxis. When I dynamically change the Theme, in SciStockChart, a new Y Axis is added. How can I solve this problem? Thanks, Arthur
-
Hi Arthur, You need to provide a value for the YAxis property explicitly, to avoid getting it from the default style. For example, you could set YAxis="{x:Null}" in your Xaml, or bind the YAxis to some property in your ViewModel. Best regards, Yuriy
-
Thank you!!!
- You must login to post comments
Please login first to submit.