Hi glikoz,
1- When user zoom(only horizontal) on ChartA ,ChartB will be zoomed as same way as ChartA..(SetMinMax is not solution !..
You can associate one series to left axis and the other to right axis:
Code: Select all
fastLine1.VertAxis=Steema.TeeChart.Styles.VerticalAxis.Left; fastLine2.VertAxis=Steema.TeeChart.Styles.VerticalAxis.Right;
Another option is using a custom vertical axis for one of the series. For more information on custom axes please have a look at the tutorials at the Teechart program group. If you want to zoom the custom axis you can do something like:
Code: Select all
private int myX0, myX1, myY0, myY1;
private void tChart1_Zoomed(object sender, System.EventArgs e)
{
axis1.SetMinMax(axis1.CalcPosPoint(myX1), axis1.CalcPosPoint(myX0));
}
private void tChart1_UndoneZoom(object sender, System.EventArgs e)
{
axis1.Automatic=true;
}
private void tChart1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
myX0=e.X;
myY0=e.Y;
}
private void tChart1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
myX1=e.X;
myY1=e.Y;
}
2-When user zoom(only horizontal) on ChartA , Minimum-Maximum values of Y-Axis will be set to visible values on chart ..
You can set your axes having overall maximum and minimum scaling by using:
Code: Select all
tChart1.Axes.Left.SetMinMax(Math.Min(fastLine1.YValues.Minimum,fastLine2.YValues.Minimum),
Math.Max(fastLine1.YValues.Maximum,fastLine2.YValues.Maximum));
3-I have one scroll bar for two chart ..I easily scrool both chart as you see
Code:
ChartList.Axes.Bottom.Scroll(e.NewValue - e.OldValue, true);
But problem is that I couldn sychronize scroll bar with chart..If chart is not scrollable(all values visible) my scrollbar must disabled..Or if rightest value is visible scrollbar must push right side (u couldnt drag it to right )..
For axis scrolling you could use Axis Arrows tool or also "play" a little bit with different SetMinMax approaches I've shown you.