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



Can I use NumericAxis as XAxis with SciStockChart?


  • You must to post comments

Hi there,

You could try to do a following (modified “Create a Stock Chart” example):

        public CreateSimpleStockChart()

            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,

  • Arthur Romanov
    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
  • Yuriy Zadereckiy
    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
  • Arthur Romanov
    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
  • Yuriy Zadereckiy
    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
  • Arthur Romanov
    Thank you!!!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.