I have a master chart defined in the XAML and below it any number of charts added in code behind. These charts will all share the same timeline and i'd like a single zoombar on the top most master to control all charts on the page. I tried binding the window position and scale of the dynamic charts to the same property of the master, but nothing. A simple example of the solution is attached.
Cheers
Peter
0044.GenerateChart.zip
Hello Peter,
XamDataChart has a functionality to synchronize X or Y zooming between multiple chart controls.Please take a look at the below document for more details.
Chart Synchronizationhttps://ko.infragistics.com/help/wpf/datachart-chart-synchronization
I have modified your sample to demonstrate the chart synchronization feature.
GenerateChart_Mod.zip
Hi, apologies for rejecting the answer but there's one small thing I can't get to work. If you set the WindowScaleHorizontal of the master the children don't pick it up. Once you touch the zoom control of the master then the kids get in sync.
I have a requirement to only display the last 7 days of data and have the rest available for scrolling. I've used scale to accomplish this.
I changed WindowScaleHorizontal of the top chart like below to see the other charts pick up the same scale automatically.
xmDataChart.WindowScaleHorizontal = .5;
Would it be possible for you to provide a sample that reproduces your problem?
Hi, the attached shows he behavior. Top chart is set to .5 and displays properly at launch. The 3 synced charts below open at 1. If you click anywhere in the top chart scroll bar the other charts change to .5
Thanks
8032.GenerateChart_Mod.zip
Hello Peter, In order for the synced charts to get the top chart's WindowScaleHorizontal value, please set the property in the code behind after the charts are created like below.
MainWindow.xaml.cs---------------- public MainWindow() { InitializeComponent(); Presenter vm = new Presenter(); this.DataContext = vm; NewChart();
//Set the top chart's WindowScaleHorizontal xmDataChart.WindowScaleHorizontal = .5; }----------------
GenerateChart_Mod2.zip