When I create a bar graph and maximize the form, some bars are drawn outside the axes.
See sample project and printscreens attached:
Normal.gif => Printscreen of form (Windowstate = wsNormal) - Zip in screens.zip
resized.gif => Printscreen of form (Windowstate = wsMaximized) - Zip in screens.zip
Project27.ZIP => Sample project (compiled & packed)
Teechart.zip => Source file (Zip)
I´m using:
TeeChart Pro V. 8.08.80307
Delphi 2007 (11.0.2902.10471)
The graph is drawn outside the axes
The graph is drawn outside the axes
- Attachments
-
- Screens.zip
- Screens
- (125.55 KiB) Downloaded 377 times
-
- Teechart.zip
- Sources
- (131.97 KiB) Downloaded 375 times
-
- Project27.zip
- Project
- (471.12 KiB) Downloaded 376 times
Re: The graph is drawn outside the axes
Hello,
I've seen you set the bottom axis MinimumOffset and MaximumOffset, both to 28 pixels. Note that this is a fix distance, but the bars width varies when the chart is resized. In your case, the MinimumOffset is the distance from the Left axis to the bottom axis 0 value. Then, when the chart is resized and the first bar size is bigger than 28, it looks cut.
I'd suggest you to put a 0 MinimumOffset and MaximumOffset (and let TeeChart calculate it internally for you) or to calculate it at onResize event. For example, like this:
I've seen you set the bottom axis MinimumOffset and MaximumOffset, both to 28 pixels. Note that this is a fix distance, but the bars width varies when the chart is resized. In your case, the MinimumOffset is the distance from the Left axis to the bottom axis 0 value. Then, when the chart is resized and the first bar size is bigger than 28, it looks cut.
I'd suggest you to put a 0 MinimumOffset and MaximumOffset (and let TeeChart calculate it internally for you) or to calculate it at onResize event. For example, like this:
Code: Select all
with Chart1.Axes.Bottom do
begin
MinimumOffset:= (Chart1[0] as TBarSeries).BarWidth+10;
MaximumOffset:=MinimumOffset;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The graph is drawn outside the axes
I changed the MinimunOffset to 0 but the Teechart change it to 22 (and problem persists when I resize form).
Then I use the code you sendid, but it only works when I resize the form (not when form is Maximized).
See attached pictures:
Normal_Screen.GIF -> Display form
Resized_Form.GIF -> After form is resized
Maximized_Screen.GIF -> After maximize form
Restores_Screen.GIF -> After restore form (exit maximized)
In each instant the graph looks different.
Then I use the code you sendid, but it only works when I resize the form (not when form is Maximized).
See attached pictures:
Normal_Screen.GIF -> Display form
Resized_Form.GIF -> After form is resized
Maximized_Screen.GIF -> After maximize form
Restores_Screen.GIF -> After restore form (exit maximized)
In each instant the graph looks different.
- Attachments
-
- Teechart.zip
- (127.14 KiB) Downloaded 355 times
Re: The graph is drawn outside the axes
Hello,
See the attached project and the exe compiled with TeeChart v2011.
Right, it still happens in v8, but not in v2011.NatSam wrote:I changed the MinimunOffset to 0 but the Teechart change it to 22 (and problem persists when I resize form).
See the attached project and the exe compiled with TeeChart v2011.
It's a little bit tricky to make it run. You need to calculate the offsets in function of the BarWidth value. And the chart needs to be drawn so BarWidth has a new/correct value. So it would be better if you put that code in OnAfterDraw event, to be sure you are taking the correct BarWidth value. However, at this point the chart has already been drawn and the new calculated Offsets won't be applied until the next repaint. So you could force a chart repaint into the AfterDraw event, with the endless loop danger it represents. Take a look at the attached project, compiled with TeeChart v8.NatSam wrote:Then I use the code you sendid, but it only works when I resize the form (not when form is Maximized).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The graph is drawn outside the axes
Today the version 8 is perfect for me (I use Delphi 2007).
I migrate to the 2011 version of it if the cost were not so high. Is possible to get a discount on the upgrade value?
I migrate to the 2011 version of it if the cost were not so high. Is possible to get a discount on the upgrade value?
Re: The graph is drawn outside the axes
Hello NatSam,
I'd suggest you to contact the sales department for it, emailing at "sales at steema dot com".NatSam wrote:I migrate to the 2011 version of it if the cost were not so high. Is possible to get a discount on the upgrade value?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The graph is drawn outside the axes
Today I use:
Delphi 2007 (11.0.9.2902.10471)
QuickReport 5.02
ReportBuilder Enterprise 12.05
The 2011 version is 100% compatible with this components ?
Delphi 2007 (11.0.9.2902.10471)
QuickReport 5.02
ReportBuilder Enterprise 12.05
The 2011 version is 100% compatible with this components ?
Re: The graph is drawn outside the axes
Hello NatSam,
Here it is the QuickReport article with the instructions to build and compile that packages:
http://www.teechart.net/reference/articles/index.php
If you find any problem in the process, don't hesitate to let us know.
Anyway, I'd suggest you to try the evaluation version before purchasing it so you can check if it fits your requirements.
Yes, TeeChart supports D2007.NatSam wrote:Delphi 2007 (11.0.9.2902.10471)
You'll find the packages to recompile and install in the folder "\Delphi11\QuickReport" in your TeeChart installation path.NatSam wrote:QuickReport 5.02
Here it is the QuickReport article with the instructions to build and compile that packages:
http://www.teechart.net/reference/articles/index.php
If you find any problem in the process, don't hesitate to let us know.
You'll have to contact Digital Metaphors to get instructions about how to recompile and install the packages to integrate TeeChart into ReportBuilder.NatSam wrote:ReportBuilder Enterprise 12.05
Anyway, I'd suggest you to try the evaluation version before purchasing it so you can check if it fits your requirements.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |