daajl.blogg.se

Tchart zoom delphi
Tchart zoom delphi













tchart zoom delphi tchart zoom delphi

Use the AllowPanning property to disable Scroll or limit Scroll to one direction. Zooming out will trigger the Chart.UndoZoom event.Īs default Scroll is enabled for all directions. Zooming in manually, or by code, will trigger the Chart.OnZoom event. ZoomRect(Rect((2), (MaxYValue(Axes.Left)),

tchart zoom delphi

Once AnimatedZoom is enabled you may zoom manually with the Mouse or by code. Instead of jumping from 'zoomed out' to 'zoomed in' in one step, you may set AnimatedZoom to enabled and define staggered steps for the zoom. ZoomRect(Rect((2),Ī(MaxYValue(Axes.Left)),Ī(MinYValue(Axes.Left)))) Īnimated Zoom offers stepped zooming. The following code will zoom in on an area between the 2nd and 5th x-axis points, setting the y-axis to the scale of the maximum and minimum points of the entire Chart: With Chart1 do The ZoomRect co-ordinates are defined in screen pixels where 0,0 is the top left hand point of the Chart Panel. Rect.Bottom:= LineSeries1.CalcYPosValue( 15000 ) Rect.Right := LineSeries1.CalcXPosValue( 57.6 ) Rect.Top := LineSeries1.CalcYPosValue( 5000 ) To define a rectangular area over which to Zoom use the ZoomRect method:Įxample Rect.Left := LineSeries1.CalcXPosValue( 22.5 ) See the Chart Zooming for an alternative guide to 'How to' Zoom. Use the AllowZoom property to disable zoom. Release the button and the Chart will redraw to the originally defined Chart area. To undo the scroll, press the left mousebutton anywhere on the Chart area and drag up and left with the mousebutton depressed. When you release the mousebutton the Chart will remain at the new location. To scroll a Chart across, press the left mousebutton and, maintaining the mousebutton pressed, drag the mouse in the direction you wish to scroll the Chart. Releasing the button will force the Chart to redraw to the originally defined Chart area. To undo the zoom, press the left mousebutton anywhere on the Chart area and drag up and left with the mousebutton depressed. Releasing the mousebutton will force the Chart to redraw the area selected. To zoom in on a Chart, press the right mousebutton at the top left hand corner of the area you wish to zoom in on and, maintaining the mousebutton pressed, drag out the rectangle to the bottom righthand corner of the zoom area. How to Zoom and Scroll using the Mouse Zoom See the Visual Basic example code in folders 'Animated Zoom' and 'Scrolling'. Zoom and Scroll are useful aids for focusing on specific data in a densely populated Chart.















Tchart zoom delphi