Download QCChart2D User Manual - Quinn

Transcript
Zooming 323
component
A reference to the ChartView object that the chart is placed in.
transforms
An array, size numtransforms, of the PhysicalCoordinates objects
associated with the zoom operation.
brescale
True designates that the all of the scales should be re-scaled, once
the final zoom rectangle is ascertained.
Call the ChartZoom.SetEnable(true) method to enable the zoom object.
Restrict zooming in the x- or y-direction using the SetZoomXEnable and
SetZoomYEnable methods. Set the rounding mode associated with rescale operations
using the SetZoomXRoundMode and SetZoomYRoundMode methods. Call the
ChartZoom.PopZoomStack method at any time and the chart scale reverts to the
minimum and maximum values of the previous zoom operation. Repeated calls to the
PopZoomStack method return the chart scale is to its original condition, after which the
PopZoomStack method has no effect.
Starting with Revision 2.0, zoom stack processing is internal to ChartZoom class. There
is no need to subclass the ChartZoom class in order to implement a zoom stack. Just set
the ChartZoom.InternalZoomStackProcessing property true.
zoomObj.InternalZoomStackProcesssing = true;
Return to a previous zoom level by right clicking the mouse. Change the zoom stack
button using the ZoomStackButtonMask property. Setting it to MouseButtons.Left,
MouseButtons.Right or MouseButtons.Middle.
Super zoom example (Adapted from the SuperZoom example)
In this example, a new class derives from the ChartZoom class and the MousePressed
event overridden. The event invokes the PopZoomStack method. Otherwise, the default
operation of the ChartZoom class controls everything else.
[C#]
public class SuperZoom
{
.
.
SimpleDataset Dataset1
SimpleDataset Dataset2
SimpleDataset Dataset3
: com.quinncurtis.chart2dnet.ChartView
= new SimpleDataset("First", x1,y1);
= new SimpleDataset("Second",x1,y2);
= new SimpleDataset("Third", x1,y3);