TChart7 & BCB5 new issue

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

TChart7 & BCB5 new issue

Post by NickH » Tue Oct 14, 2008 12:50 pm

Hi,

I have managed to get TChart7 pro installed and operating correctly in new "Toy" programs. I have now converted an existing large program to TChart7 which seems to work OK. I now want to add a TChartEditor component to an existing TChart. The form compiles successfully but the program fails to link. The error being a list including...

[linker error] Unable to open file "BRUSHDLG.DFM
[linker error] Unable to open file "PENDLG.DFM
[linker error] Unable to open file "IEDITCHA.DFM
etc

I have referenced any conceivable file but I cannot get rid of any of the errors. Do you have any suggestions ?.

Incidentally I believe there is an error in the Template section of the Tee7New example program(C++ version). Clicking the "Run the example" button leads to a "Wrong *.tee file format" error.

I think there should be an extra line setting the Memory Stream position to 0 before calling "LoadChartFromStream"

Thanking you in advance,

Nick

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

Post by Narcís » Tue Oct 14, 2008 1:53 pm

Hi Nick,
I have managed to get TChart7 pro installed and operating correctly in new "Toy" programs. I have now converted an existing large program to TChart7 which seems to work OK. I now want to add a TChartEditor component to an existing TChart. The form compiles successfully but the program fails to link. The error being a list including...

[linker error] Unable to open file "BRUSHDLG.DFM
[linker error] Unable to open file "PENDLG.DFM
[linker error] Unable to open file "IEDITCHA.DFM
etc

I have referenced any conceivable file but I cannot get rid of any of the errors. Do you have any suggestions ?.
Yes, could you please try the solution suggested by another client here?
Incidentally I believe there is an error in the Template section of the Tee7New example program(C++ version). Clicking the "Run the example" button leads to a "Wrong *.tee file format" error.

I think there should be an extra line setting the Memory Stream position to 0 before calling "LoadChartFromStream"


Yes, that's right. Thanks for letting us know. I'll try to fix it for future releases.
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

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Fri Oct 24, 2008 4:05 am

Thanks that solved the problem.

I have been running through the TChart pro 7 capabilities. Impressive!.
I have a couple of questions.

First, if I use the ChartEditor in design mode, then in the Tools panel I can see settings for each tool. For example, if I choose an annotation tool I can set the text, position... etc, but I cannot do this at runtime. I know that it is possible as I can see it done in Tee7New.exe. Can you help please.

Second, is it possible to construct vertical Color Bands on the X-Axis. For example in a chart with a Stock price on the Y-Axis and dates on the X-Axis we might want to show the periods of economic recessions as vertical shaded bands.

Thank you in advance

Nick.

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Fri Oct 24, 2008 5:49 am

Hi another question. I need to set a chart back to default settings but not 3D.

I have tried ...

void* V = Null;
TChart* TempChart = new TChart(V);
Chart->Assign(TempChart);
delete TempChart;

but after adding TLineSeries programmatically the chart is in 3D. How can I ensure the chart is 2D.

Thanking you

Nick

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

Post by Narcís » Fri Oct 24, 2008 8:03 am

Hi Nick,
First, if I use the ChartEditor in design mode, then in the Tools panel I can see settings for each tool. For example, if I choose an annotation tool I can set the text, position... etc, but I cannot do this at runtime. I know that it is possible as I can see it done in Tee7New.exe. Can you help please.
Yes, you can set annotation's properties like this:

Code: Select all

	ChartTool1->Text="My Annotation Tool";
	ChartTool1->Shape->Color=clRed;
	ChartTool1->Shape->CustomPosition=true;
	ChartTool1->Shape->Left=100;
	ChartTool1->Shape->Top=100;
Second, is it possible to construct vertical Color Bands on the X-Axis. For example in a chart with a Stock price on the Y-Axis and dates on the X-Axis we might want to show the periods of economic recessions as vertical shaded bands.
Yes, once having created a ColorBand tool you just need to assign it to the bottom axis (or chart's horizontal axis) and set its start and end values, for example:

Code: Select all

	ChartTool1->Axis=Chart1->Axes->Bottom;
	ChartTool1->StartValue=EncodeDate(2008,10,24);
	ChartTool1->EndValue=EncodeDate(2008,10,30);
Hi another question. I need to set a chart back to default settings but not 3D.

I have tried ...

void* V = Null;
TChart* TempChart = new TChart(V);
Chart->Assign(TempChart);
delete TempChart;

but after adding TLineSeries programmatically the chart is in 3D. How can I ensure the chart is 2D.
You can use this:

Code: Select all

	Chart1->View3D=false;
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

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Fri Oct 24, 2008 10:27 am

Thanks for your quick response.

I may not have explained clearly, I want the user to be able to amend Tools properties in the runtime ChartEditor.

In the Tool tab of the ChartEditor in Tee7New.exe the panel to the right of the list of Tools displays properties. I want the user to be able to amend these properties.

How can I make the Tools properties available at runtime in the ChartEditor ?


Thanking you

Nick

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

Post by Narcís » Fri Oct 24, 2008 11:19 am

Hi Nick,

This works fine for me here using latest TeeChart Pro v7 VCL release available at the client download area and BCB 5 with all updates available installed. Which are the BCB 5 and TeeChart versions you are using?

If the problem persists please send us a simple example project we can run "as-is" to reproduce the problem here. You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Fri Oct 24, 2008 12:56 pm

Hi again,

I am using BCB 5 Build 12.34 with Update Pack 1 in Windows XP + SP3.

In your program Tee7New.exe I can see the Tool properties. In a toy program and a real program I cannot see the Tool properties, which makes me think I am either doing something wrong or missing some setting?.

I am going to send the toy program when I work out how.

Thanks

Nick.

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Mon Oct 27, 2008 1:00 pm

Hello,

I sent the "toy program" on Friday to you upload page. I hope you received it ?.

Thanks,

Nick

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

Post by Narcís » Mon Oct 27, 2008 1:02 pm

Hi Nick,

Yes, we received it and could reproduce the issue here. We are investigating it and will get back to you when we have further news.
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:

Post by Narcís » Tue Oct 28, 2008 11:59 am

Hi Nick,

I couldn't get it working using your project but works fine for me here using a new project from scratch. I just sent it to you, could you please check if it works fine for you?

Thanks in advance.
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

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Tue Oct 28, 2008 9:47 pm

Hi Narcis,

Can you please resend the new project, the Unit1.cpp file was missing.

Thanks

Nick

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Wed Oct 29, 2008 5:42 am

Hi Narcis,

I copied a default Unit1 to your Project added a TChart and a TChartEditor. In the Tools section of the ChartEditor, properties were availble but only for the "Extra Legend", "Clip Series", "Drag Point", "Gantt Drag" and "Pie Slices" tools. Properties were not visible for all other Tools, including the "Annotation" tool etc.


This might give you a clue as to what is wrong.


Thanks

Nick

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

Post by Narcís » Thu Oct 30, 2008 9:54 am

Hi Nick,

Sorry, I've sent you missing file. Could you please check if my example project works fine now for you?

Thanks in advance.
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

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Post by NickH » Thu Oct 30, 2008 1:48 pm

Hi Narcis,

I finally got it to work. Initially your example project only partially worked as in my previous posting.

I finally got it to work by fiddling around with the pragma directives. I have not identified the problem exactly. I can send you a project that worked and a similar one that did not if you are interested.

I still have to get it to work in a real program but I have hopes.

Thanks

Nick

Post Reply