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

0
0

Hello,
I’m trying your example Multi-Pane Stock Charts. And if I use your variant of code it works perfectly. To start your variant I use this code:

var wnd = new Window1();
var test = new CreateMultiPaneStockChartsViewModel();
wnd.Chart.ChartPanes = test.ChartPaneViewModels;
wnd.Show();

where wnd.Chart.ChartPanes is ObservableCollection of BaseChartPaneViewModel and is binded to SciChartGroup ItemsSource.
But if I try add paneviewmodel via Add method:

var wnd = new Window1();
var test= new CreateMultiPaneStockChartsViewModel();
foreach (var p in test.ChartPaneViewModels)
        wnd.Chart.ChartPanes.Add(p);

In Window1 I subscribe on ChartPanes.CollectionChanged where I raise OnPropertyChanged event to update binding.
after adding second paneviewmodel I have error: System.NullReferenceException in Abt.Controls.SciChart.Wpf.dll. How Can I add chart panes via Add method in my case?

Second question is in your example doesn’t work correctly panes hiding. If I hit triangle button to hide for example MACD pane it only moves down under scrollbar but does not hide. And if I next hide volume pane it hides but with scrollbar. How to fix this bug?

  • You must to post comments
0
0

For second question answer is I looked demo from your site: https://www.scichart.com/Abt.Controls.SciChart.SL.ExampleTestPage.html#/Abt.Controls.SciChart.Example;component/Examples/IWantTo/CreateStockCharts/MultiPane/CreateMultiPaneStockCharts.xaml.
In my project lib version is older (3.4.1)
For first question I’ll try to make a simple project.

  • You must to post comments
0
0

Here is simple example for first question (pane hiding doesn’t work well there too).

Attachments
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.