Page 1 of 2

TChart7 & BCB5 new issue

Posted: Tue Oct 14, 2008 12:50 pm
by 9231184
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

Posted: Tue Oct 14, 2008 1:53 pm
by narcis
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.

Posted: Fri Oct 24, 2008 4:05 am
by 9231184
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.

Posted: Fri Oct 24, 2008 5:49 am
by 9231184
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

Posted: Fri Oct 24, 2008 8:03 am
by narcis
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;

Posted: Fri Oct 24, 2008 10:27 am
by 9231184
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

Posted: Fri Oct 24, 2008 11:19 am
by narcis
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.

Posted: Fri Oct 24, 2008 12:56 pm
by 9231184
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.

Posted: Mon Oct 27, 2008 1:00 pm
by 9231184
Hello,

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

Thanks,

Nick

Posted: Mon Oct 27, 2008 1:02 pm
by narcis
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.

Posted: Tue Oct 28, 2008 11:59 am
by narcis
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.

Posted: Tue Oct 28, 2008 9:47 pm
by 9231184
Hi Narcis,

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

Thanks

Nick

Posted: Wed Oct 29, 2008 5:42 am
by 9231184
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

Posted: Thu Oct 30, 2008 9:54 am
by narcis
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.

Posted: Thu Oct 30, 2008 1:48 pm
by 9231184
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