Bug in Zooming |
Post Reply ![]() |
Author | |
White Dave ![]() Member ![]() Joined: 03 Jun 2012 Posts: 42 |
![]() ![]() ![]() ![]() Posted: 08 Jul 2016 at 10:37pm |
When doing the control/zoom on a chart, the result of the zoom differs depending on whether you zoom from bottom right to top left or vice/versa. Tracing through the code to TChartPane.DoZoomIn procedure, there appears to be an error in one of the else if statements (cut and paste error?).
if (CtrlZooming = czYAxis) or (CtrlZooming = czBoth) then begin if (FRy - FCy) > 0 then begin Series.ForceInit(true); Series.Mode := cmScaling; for I := 0 to Series.Count - 1 do begin Series.AutoRange := arDisabled; pmin := Series.YToValue(FRy, FSeriesRect); pmax := Series.YToValue(FCy, FSeriesRect); if pmax - pmin > ZOOMMIN then begin TCrackedChartSerie(Series).MinimumValue := pmin; TCrackedChartSerie(Series).MaximumValue := pmax; end; end; Chart.InitializeChart(ChartView.Canvas, FRect, 1, 1); end else if (FRy - FCy) > 0 then <= this branch will never get called!! begin Series.ForceInit(true); Series.Mode := cmScaling; for I := 0 to Series.Count - 1 do begin Series.AutoRange := arDisabled; pmin := Series.YToValue(FCy, FSeriesRect); pmax := Series.YToValue(FRy, FSeriesRect); if pmax - pmin > ZOOMMIN then begin TCrackedChartSerie(Series).MinimumValue := pmin; TCrackedChartSerie(Series).MaximumValue := pmax; end; end; Chart.InitializeChart(ChartView.Canvas, FRect, 1, 1); end; end; |
|
![]() |
|
Pieter Scheldeman ![]() TMS Support ![]() Joined: 18 May 2010 Posts: 3392 |
![]() ![]() ![]() ![]() |
Hi,
We have fixed this here, the next version will address this.
|
|
![]() |
Post Reply ![]() |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |