I have one chart with two areas. When I zoom or slide on scroll bar one chart area, other chart area also zoom and sliding. I have been trying to add panning to my project. When I was searching I found MSChart Extension and I loved it(https://www.codeproject.com/Articles/357817/MSChart-Extension-Zoom-and-Pan-Control).
I want to use MSChart Extension but like I said I need to synchronize two chart areas. When I zoom one chart area, the other chart area must be zoomed or when I pan one area the other chart area must be panned automatically.
or I just need to add the panning feature instead of scroll bars without MSChart Extension.
Could you please help me for that?
I did it on standard chart code without mschart extension with following code piece It works with mouse wheel zoom and slide on scroll bars, but it does not sychronize two chart areas when I control chart with MSChart Extension (zoom and pan).
private void chart1_AxisViewChanged(object sender, ViewEventArgs e)
{
if (e.Axis == chart1.ChartAreas["ChartArea1"].AxisX)
{
chart1.ChartAreas["ChartArea2"].AxisX.ScaleView.Size = chart1.ChartAreas["ChartArea1"].AxisX.ScaleView.Size;
chart1.ChartAreas["ChartArea2"].AxisX.ScaleView.Position = chart1.ChartAreas["ChartArea1"].AxisX.ScaleView.Position;
}
if (e.Axis == chart1.ChartAreas["ChartArea2"].AxisX)
{
chart1.ChartAreas["ChartArea1"].AxisX.ScaleView.Size = chart1.ChartAreas["ChartArea2"].AxisX.ScaleView.Size;
chart1.ChartAreas["ChartArea1"].AxisX.ScaleView.Position = chart1.ChartAreas["ChartArea2"].AxisX.ScaleView.Position;
}
}
Best kind regards,