![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | TChart does not work properly, when Zooming with ZoomPercent | ||
|---|---|---|---|
| Product: | FireMonkey TeeChart | Reporter: | Mustafa Celik <celik> |
| Component: | Chart | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | major | CC: | david, sandra |
| Priority: | Normal | ||
| Version: | 140220 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
|
Description
Mustafa Celik
2014-03-25 08:19:26 EDT
PS: The issues comes up on Win32 and on Android I think this is not a bug. Its by design. ZoomPercent applies a percentage zoom relative to the existing "zoom" (axis scales). If you wish an absolute zoom, first reset the axes and then apply the zoom, like: procedure TForm1.cbxScaleChange(Sender: TObject); begin fScale := (100/fScale) * StrToFloat(cbxScale.Selected.Text); TDBChart1.Axes.Reset; // <-- Reset to 100% TDBChart1.ZoomPercent(fScale); end; (Bezüglich comment 2 von david berneda) > I think this is not a bug. Its by design. > ZoomPercent applies a percentage zoom relative to the existing "zoom" (axis > scales). > > If you wish an absolute zoom, first reset the axes and then apply the zoom, > like: > > procedure TForm1.cbxScaleChange(Sender: TObject); > begin > fScale := (100/fScale) * StrToFloat(cbxScale.Selected.Text); > > TDBChart1.Axes.Reset; // <-- Reset to 100% > > TDBChart1.ZoomPercent(fScale); > end; Hello Mr. Berneda, thank you for the fast response! i tried to do it with TDBChart1.UndoZoom() before doing a ZoomPercent. But UndoZoom() has not been fired properly or is it not the correct procedure at this point? I will try your solution. and give response. Thank you again! Mr.Berneda, the effect is the same as before. The existing zoom gets a percentage zoom again and again but not changing the axes back to 100%. Code: procedure TForm1.cbxScaleChange(Sender: TObject); begin fScale := StrToFloat(cbxScale.Selected.Text); TDBChart1.Axes.Reset; // <-- Reset to 100% TDBChart1.ZoomPercent(fScale); end; |