Hi,
Can I have multiple YAxis in SciStockChart?
Thanks,
Arthur
- Arthur Romanov asked 11 years ago
- You must login to post comments
Hi Arthur,
Yes, you can. Here is modified code from the “Create a Stock Chart” example, which shows how to achieve that:
//Constructor from code-behind public CreateSimpleStockChart() { InitializeComponent(); stockChart.YAxis = null; stockChart.YAxes = new AxisCollection(); stockChart.YAxes.Add(new NumericAxis{AxisAlignment=AxisAlignment.Left, AxisTitle="Left", Id="First"}); stockChart.YAxes.Add(new NumericAxis { AxisAlignment = AxisAlignment.Right, AxisTitle = "Right",Id="Second" }); }
Also you need to set YAxisId property for RenderableSeries:
<s:SciStockChart.RenderableSeries> <s:FastCandlestickRenderableSeries YAxisId="First" /> </s:SciStockChart.RenderableSeries>
Hope this is helpful!
Best regards,
Yuriy
- Yuriy Zadereckiy answered 11 years ago
-
Hi Yuriy, when I tried binding YAxes
<sciChart:SciStockChart Grid.Row="1" SeriesSource="{Binding ChartManager.SeriesViewModels}" YAxes="{Binding ChartManager.YAxes}" DrawMinorGridLines="False" XAxisVisibleRange="{Binding ChartManager.XVisibleRange, Mode=TwoWay}" > </sciChart:SciStockChart>
I have the exception: "Exception has been thrown by the target of an invocation." Thanks, Arthur -
Hi Yuriy, The question is closed. I should set DataContext before InitializeComponent.
public StockChartView() { DataContext = _stockChartViewModel; InitializeComponent(); }
Thanks, Arthur
- You must login to post comments
Please login first to submit.