![]() | 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: | Zooming in on bar chart does not widen the bars | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | h.hasenack <hans> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | IN_PROGRESS --- | ||
| Severity: | normal | CC: | david, sandra |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | Bar | Delphi / C++ Builder RAD IDE Version: | RAD XE5 |
| Attachments: |
Unzoomed chart
Zoomed in without the proposed patch Zoomed in with the patch applied |
||
Created attachment 86 [details]
Zoomed in without the proposed patch
Created attachment 87 [details]
Zoomed in with the patch applied
Thanks for the patch. Can you attach a example project? The proposal looks fine for this specific case, but it will break other combinations of series, or multiple bar series that are "side-stacked", or with Horizontal Bar series, etc. I'll try to improve this calculation when AutoBarSize=True. You can use the teechart office or teehcart demo app to reproduce. Just pick a bar chart and zoom-in. Zoom works, but bars are not widened accordingly. |
Created attachment 85 [details] Unzoomed chart When using a barchart, and Autobarwidth is FALSE, and zooming in eg using mouse the data is zoomed in but the bars do not get wider. (Using the AutoBarsize=TRUE does not do what I require either) CHeck the attachments for what I mean. Heres the patch to be applied to TCusomBarSeries.CalcBarWidth --- if FAutoBarSize then tmp:=Round(IAxisSize/(2.0+Maximum-Minimum)) else {$ifdef HH_PATCH_TC_ZOOMBARSIZE} begin lMax:=ParentChart.MaxXValue(NotMandatoryAxis); lMin:=ParentChart.MinXValue(NotMandatoryAxis); lZoomFactor:=Maximum-Minimum; if lZoomFactor>0.0 then lZoomFactor:=(lMax-lMin)/lZoomFactor else lZoomFactor:=1.0; tmp:=round(IAxisSize*lZoomFactor) div IMaxBarPoints; end; {$else} // TV52014436 tmp:=IAxisSize div IMaxBarPoints; {$endif} ---