SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

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!

  • You must to post comments
0
0

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

  • esper
    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 to post comments
0
0

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

  • esper
    Thanks, SciChartSurface works perfectly!
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.