ColorLineTool not displayed properly

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
sevenout
Newbie
Newbie
Posts: 6
Joined: Thu May 16, 2013 12:00 am

ColorLineTool not displayed properly

Post by sevenout » Tue Oct 08, 2013 10:51 pm

I'm using XE4 with TeeChartPro 2013 Build 2013.08.130521

I've got a form that has 6 different TeeCharts in a TcxScrollBox (DevEx component). When the form is displayed you can initially see about 2.5 charts and the user has to scroll down to see the others. Each chart as between 1 to 5 ColorLineTools added. All charts are bar graphs. The charts are not data-aware although the values that are loaded at run-time come from a database. The form has a button that will run a QuickReport v5 report that will print the charts along with some other data. The charts on the report are all loaded from the charts on the form using the following code.

Code: Select all

QRChart2.Width := ImpRefDetailBand.Width;
QRChart2.Height := frmTR.chtImpRef.Height;
QRChart2.SetChart(frmTR.chtImpRef);
TBarSeries(QRChart2.Chart[0]).AutoBarSize := True;
QRChart2.Chart.Color := clWhite;
QRChart2.Chart.BottomAxis.Automatic := True;
QRChart2.Chart.MaxPointsPerPage := 25;
QRChart2.Chart.ScaleLastPage := False;
Everything works perfectly except for the ColorLineTools on the printed charts. I've found that if the chart has NOT been scrolled into view in the TcxScrollBox before the report is printed, then the ColorLineTools will be printed way above the top of the chart (above the y axis scale). If I scroll to the bottom of the TcxScrollBox and then back to the top (so that all charts were visible at some point) then the ColorLineTools on the report will all be printed correctly. I've tried everything I can think of but can't figure out what is causing this to happen. Any ideas?

Thanks
Scott

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ColorLineTool not displayed properly

Post by Yeray » Thu Oct 10, 2013 3:34 pm

Hi,

I'm not sure if the way you organize the charts in the report could be important here.
Could you please try to arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sevenout
Newbie
Newbie
Posts: 6
Joined: Thu May 16, 2013 12:00 am

Re: ColorLineTool not displayed properly

Post by sevenout » Mon Oct 21, 2013 9:23 pm

I have attached a sample application to illustrate the problem. The sample consists of 2 forms. Once is the main form with 2 TCharts and the other is a QuickReport form with 2 TQRCharts.

When you first run the program you will see one chart with 5 ColorLineTool lines visible. There is a second chart off screen below the first chart that has 4 ColorLineTool lines. To make that chart visible you will need to make the window taller but DO NOT do that yet. Click the Go button to open a QuickReport preview of the 2 charts. The two charts correspond to the two charts on the main form. You'll see that the ColorLineTool lines are correct on the top chart but the lines for the bottom chart are all displayed at the top of the chart above the bar graph. This is the problem.

If you now close the preview and then resize the main form so that any portion of the second chart is visible and then click the Go button again, you'll see the second chart on the preview now shows the ColorLineTool lines correctly.

FYI. The attached file does not contain an executable sample (just project source files). The forum upload would not allow me to attach a file larger than 512Kb. If you need a sample EXE let me know where I can email it.

Scott Slater
Attachments
TeeChartBug.zip
(85.73 KiB) Downloaded 381 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ColorLineTool not displayed properly

Post by Yeray » Fri Oct 25, 2013 8:00 am

Hi,

Excuse us for the delayed reply. We will prepare an environment like yours to do the tests as soon as possible.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sevenout
Newbie
Newbie
Posts: 6
Joined: Thu May 16, 2013 12:00 am

Re: ColorLineTool not displayed properly

Post by sevenout » Thu Oct 31, 2013 9:03 pm

Just wondering if there was any update on this issue. I can still send you a working sample .exe if you'd like. I can't attach it here since it only allows 512K size. I can email it to you if you'd like.

Thanks
Scott Slater

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ColorLineTool not displayed properly

Post by Yeray » Mon Nov 04, 2013 9:14 am

Hi Scott,

Excuse us for the delayed reply.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sevenout
Newbie
Newbie
Posts: 6
Joined: Thu May 16, 2013 12:00 am

Re: ColorLineTool not displayed properly

Post by sevenout » Tue Nov 05, 2013 10:25 pm

Yeray,

The upload page gives a configuration error and I cannot seem to connect to the news server you specified. I use other news servers all the time but I can't get yours to work. Is the address right? Is there an email address I can send the attachment to?

Scott

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ColorLineTool not displayed properly

Post by Yeray » Wed Nov 06, 2013 9:39 am

Hi Scott,

Sorry, you can send your attachments to "info at steema dot com", referencing this thread.
The upload page seems to work fine for me here though.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sevenout
Newbie
Newbie
Posts: 6
Joined: Thu May 16, 2013 12:00 am

Re: ColorLineTool not displayed properly

Post by sevenout » Thu Nov 07, 2013 6:17 pm

I'll send you an email shortly. Thanks!

Here is the error I get when I try to use the upload page. I'm using Chrome browser.
Attachments
Image1.jpg
Image1.jpg (89.94 KiB) Viewed 10272 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: ColorLineTool not displayed properly

Post by Narcís » Fri Nov 08, 2013 9:27 am

Hi Scott,

Thanks for the exe. The problem looks like a refresh problem to me, that the TColorLineTool instances need the chart to be painted so that they can be positioned correctly. I'd try calling TChart.Draw() before positioning the ColorLines so that all chart objects have been painted and they have valid property values. You could also try calling Draw() at TQRChart level or maybe before assigning a TChart to a TQRChart, something like this:

Code: Select all

   Form2.chtImpedance.Draw();
   QRChart1.SetChart(Form2.chtImpedance);
If this doesn't help don't hesitate to let us know.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: ColorLineTool not displayed properly

Post by Narcís » Fri Nov 08, 2013 11:41 am

Hi Scott,
sevenout wrote:Here is the error I get when I try to use the upload page.
Thanks for your feedback. The upload page has been fixed now.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

sevenout
Newbie
Newbie
Posts: 6
Joined: Thu May 16, 2013 12:00 am

Re: ColorLineTool not displayed properly

Post by sevenout » Fri Nov 08, 2013 9:48 pm

I'd try calling TChart.Draw() before positioning the ColorLines so that all chart objects have been painted and they have valid property values.
That seems to do the trick.

Thanks!
Scott

Post Reply