Here is an example that..
- ..adds a moveable
HorizontalLineAnnotation
as a handle and..
- ..codes the
AnnotationPositionChanging
to use the handle as a slider between two ChartAreas
:

Define at class level:
HorizontalLineAnnotation slider = new HorizontalLineAnnotation();
Set it up and add to Chart
:
slider.AllowMoving = true;
slider.LineWidth = 2;
slider.LineColor = Color.DarkSlateGray;
slider.X = 0;
slider.Y = 50;
slider.Width = 100;
chart1.Annotations.Add(slider);
This set the slider to the left at the middle and lets it go across the whole chart.
private void chart1_AnnotationPositionChanging(object sender,
AnnotationPositionChangingEventArgs e)
{
if (e.Annotation == slider)
{
chart1.ChartAreas[0].Position.Height = (float)slider.Y - 4;
chart1.ChartAreas[1].Position.Height = (float)(100f - slider.Y) - 4;
chart1.ChartAreas[1].Position.Y = (float)slider.Y;
chart1.Update();
}
}
This resizes the two ChartAreas
, keeping 4% slack for outside stuff. I you have a Title
, a top-docked Legend
or large Labels
you need to give more than the 4%...
Of course you can modify it to change the size of only one ChartArea
as well, although I don't see why you would want that..