.netCHARTING v6.0 Documentation Send comments on this topic.
ChartArea Zooming
See Also
Getting Started > General Tutorials > Chart Surface Objects > ChartArea Zooming

Glossary Item Box

Introduction
Chart Area Zooming is a new 4.0 feature which allows a portion of a chart to be expanded into a secondary chart area which looks like the following:

 

Usage
This works by specifying a value range of a particular axis on the main chart area. Passing this information to the ChartArea.GetZoomAreaY() or GetZoomAreaX() methods will return a new chart area which doesn't need to be modified. When added to the Chart.ExtraChartAreas collection it will result in a chart area similar to the above.

[C#]

ChartArea ca = Chart.ChartArea.GetXZoomChartArea(Chart.XAxis, new ScaleRange(new DateTime(2005,1,1),new DateTime(2006,1,1)),
new Line(Color.LightGreen,DashStyle.Dash));
Chart.ExtraChartAreas.Add(ca);

[Visual Basic]

Dim ca As ChartArea = Chart.ChartArea.GetXZoomChartArea(Chart.XAxis, New ScaleRange(New DateTime(2005, 1, 1), New DateTime(2006, 1, 1)),
New Line(Color.LightGreen, DashStyle.Dash))
Chart.ExtraChartAreas.Add(ca)

This feature can be used in conjunction with the Axis Value Coordinates feature to allow the user to specify the range to zoom.

Samples

See Also

©2010. All Rights Reserved.