Hi,
When I try to bind SciStockChart.XAxis to ViewModel, changing the SciStockChart.XAxisVisibleRange is no longer working. But when I define SciStockChart.XAxis in XAML code it works fine. What’s wrong in my binding?
I attached an example to reproduce the problem.
Thanks!
- esper asked 11 years ago
- You must login to post comments
Hello, thanks for your inquiry!
A note about SciStockChart. this is not intended to be used with any axis other than the CategoryDateTimeAxis, since stock charts by nature require category axes.
Can I ask what it is you are trying to do?
Best regards,
Andrew
- Andrew Burnett-Thompson answered 11 years ago
-
In sample I use CategoryDateTimeAxis, wich works fine if it's defined in Xaml, but not works through binding. I'm trying to make a stock chart with gaps at night or at weekends. I wanted to use CategoryDateTimeAxis and DateTimeAxis depending on the NoGap mode. That seems to be working, but when I bind XAxis to ViewModel autoscroll stops working.
- You must login to post comments
Ok, I understand, thank you for clarifying.
SciStockChart is not intended to be modified in this way (the axis type is fixed), this is why it doesn’t work.
You can however achieve the same thing by using the SciChartSurface control. The SciTrader demo uses the SciChartSurface (not SciStockChart) control and specifies the axis types, modifiers all manually.
This one will support a DateTimeAxis but does require a bit more code to get it working.
I hope this is helpful,
Andrew
- Andrew Burnett-Thompson answered 11 years ago
-
Thanks, SciChartSurface works perfectly!
- You must login to post comments
Please login first to submit.