Panel color in TChart
Panel color in TChart
I just upgraded from TeeChart v8 to 2010 in C++Builder 2010, running under Windows 7 64-bit. After I did so, all of the charts in my application turned white; the panel color setting is no longer paid attenation to. I found I can get the colors back by using the gradient function. So, I guess I can use this for all of my charts, but I'm wondering if this change was intentional, or if this behavior indicates that there is something wrong with my installation?
Thanks.
Thanks.
Re: Panel color in TChart
Hi RKetcham,
Could you please try to arrange a simple example project we can run as-is to reproduce the problem here? Step-by-step instruction explaining how to proceed with that simple example application to see the problem would also be helpful.
Thanks in advance.
Could you please try to arrange a simple example project we can run as-is to reproduce the problem here? Step-by-step instruction explaining how to proceed with that simple example application to see the problem would also be helpful.
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Panel color in TChart
I have exactly the same issue.
I recently upgraded to from C++ builder 2007 to XE, and upgraded to TChart2011.
As mentioned above, the tchart backgrounds in existing projects have turned to white, rather than their normal clBtnFace. The behaviour of what a chart defaults to is different compared to a chart made in design time vs a dynamically created chart.
Dynamically created chart:
Will have a tchart with a white background and a white back wall. The back wall transparent propert defaults to true. Changing it to false produces a dark grey back wall.
Design time created chart:
If I make a new TChart in design time, it now defaults to a gradient background.
The back wall transparent property defaults to false.
The back wall gradient defaults to true.
Turning Panel->Gradient->Visible = false, products a white background.
Setting the Panel color has no effect. As near as I can tell, keeping the gradient visible, and setting the start and end colors is now the way to set the background color. Attach is a screen capture of what charts default to at design time (left) and dynamically created at run time. To return my dynamically created charts to what they were before, I'm now adding the following code:
I recently upgraded to from C++ builder 2007 to XE, and upgraded to TChart2011.
As mentioned above, the tchart backgrounds in existing projects have turned to white, rather than their normal clBtnFace. The behaviour of what a chart defaults to is different compared to a chart made in design time vs a dynamically created chart.
Dynamically created chart:
Will have a tchart with a white background and a white back wall. The back wall transparent propert defaults to true. Changing it to false produces a dark grey back wall.
Design time created chart:
If I make a new TChart in design time, it now defaults to a gradient background.
The back wall transparent property defaults to false.
The back wall gradient defaults to true.
Turning Panel->Gradient->Visible = false, products a white background.
Setting the Panel color has no effect. As near as I can tell, keeping the gradient visible, and setting the start and end colors is now the way to set the background color. Attach is a screen capture of what charts default to at design time (left) and dynamically created at run time. To return my dynamically created charts to what they were before, I'm now adding the following code:
Code: Select all
Chart2->Gradient->Visible = true;
Chart2->Gradient->StartColor = clBtnFace;
Chart2->Gradient->EndColor = clBtnFace;
- Attachments
-
- Design vs Dynamic created charts
- TChartDesignVsDynamic.png (50.42 KiB) Viewed 19720 times
Re: Panel color in TChart
Hi Sam,
You are right. I've added it to the wish list to be studied asap (TV52015419).
You are right. I've added it to the wish list to be studied asap (TV52015419).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Panel color in TChart
Same problem here with the white panel (Win7, TeeChart 2011). Any idea about a maintenance release date?
Best, Uli
Best, Uli
Re: Panel color in TChart
Hello Uli,
I can't still provide an estimate date.I recommend you to be aware at this forums board, our RSS news feed, twitter or facebook accounts for new release announcements and what's implemented on them.
Thanks,
I can't still provide an estimate date.I recommend you to be aware at this forums board, our RSS news feed, twitter or facebook accounts for new release announcements and what's implemented on them.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Panel color in TChart
Hello Uli and Sam,
After investigating this we've concluded that it's not a bug.
In v2010 we wanted to give a better look to the new charts adding a gradient to the charts created at design time. However, we didn't want to change the aspect of the charts created at runtime to ensure backwards compatibility.
On the other hand in v2010.02 we found a related problem (TV52015430: "The back color (color of the panel) seems not to respond to the Chart.Color property"). This problem in v2010.02 has been recently solved
With v2010.02: With the TV52015430 fix: The fix will be available with the next maintenance release.
To create a "designtime looking" chart at runtime, you should set some properties manually:
After investigating this we've concluded that it's not a bug.
In v2010 we wanted to give a better look to the new charts adding a gradient to the charts created at design time. However, we didn't want to change the aspect of the charts created at runtime to ensure backwards compatibility.
On the other hand in v2010.02 we found a related problem (TV52015430: "The back color (color of the panel) seems not to respond to the Chart.Color property"). This problem in v2010.02 has been recently solved
With v2010.02: With the TV52015430 fix: The fix will be available with the next maintenance release.
To create a "designtime looking" chart at runtime, you should set some properties manually:
Code: Select all
uses TeeThemes;
procedure TForm1.FormCreate(Sender: TObject);
var Chart2: TChart;
begin
Chart2:=TChart.Create(Self);
Chart2.Parent:=Self;
Chart2.Left:=Chart1.Left + Chart1.Width;
Chart2.Top:=Chart1.Top;
Chart2.Width:=Chart1.Width;
Chart2.Height:=Chart1.Height;
// les dues linees a afegir.
Chart2.Title.Text.Add(Chart2.ClassName);
ApplyChartTheme(TOperaTheme,chart2);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Panel color in TChart
Hello Yeray,
as the next maintenance release is still not published I use the gradient solution for my designtime charts.
Now I also use the GridBand Tool with my charts. It is working fine on the screen but when I try to export a chart by the chart editor the gridband now turns into black and while stripes.
So it seems that with maintenance release V2011.02 something more has changed. The charts do not behave as before.
I hope the next release will come up soon and work as intended.
Best regards
Uli
as the next maintenance release is still not published I use the gradient solution for my designtime charts.
Now I also use the GridBand Tool with my charts. It is working fine on the screen but when I try to export a chart by the chart editor the gridband now turns into black and while stripes.
So it seems that with maintenance release V2011.02 something more has changed. The charts do not behave as before.
I hope the next release will come up soon and work as intended.
Best regards
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Panel color in TChart
Hi Uli,
This works fine for me here using code snippet below with our current sources. Does this work fine for you?Now I also use the GridBand Tool with my charts. It is working fine on the screen but when I try to export a chart by the chart editor the gridband now turns into black and while stripes.
Code: Select all
uses Series, TeeTools, TeeStore, TeeEditPro;
procedure TForm1.FormCreate(Sender: TObject);
var GridBand1: TGridBandTool;
Stream: TMemoryStream;
begin
Chart1.AddSeries(TLineSeries.Create(Self)).FillSampleValues;
GridBand1:=TGridBandTool.Create(Self);
GridBand1.Axis:=Chart1.Axes.Bottom;
GridBand1.Band1.Color:=clBlue;
GridBand1.Band2.Color:=clRed;
Stream:=TMemoryStream.Create;
SaveChartToStream(Chart1, Stream);
Chart1.ClearChart;
Stream.Position:=0;
LoadChartFromStream(TCustomChart(Chart1), Stream);
end;
We expect this to be out very soon, stay tuned!I hope the next release will come up soon and work as intended.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Panel color in TChart
Hi,
the gridband works fine in the designtime chart.
It looks like
But the chart editor shows
Also a print is wrong.
I guess it is also important to know that the transparancy for the grid bands is set to 98%
Best regards
Uli
the gridband works fine in the designtime chart.
It looks like
But the chart editor shows
Also a print is wrong.
I guess it is also important to know that the transparancy for the grid bands is set to 98%
Best regards
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Panel color in TChart
Hi Uli,
Thanks for the information. I could reproduce the issue using code snippet below and added it (TV52015471) to the defect list to be investigated. At the example code below you'll find there's a way of exporting which preserves transparency and one not.
Thanks for the information. I could reproduce the issue using code snippet below and added it (TV52015471) to the defect list to be investigated. At the example code below you'll find there's a way of exporting which preserves transparency and one not.
Code: Select all
uses Series, TeeTools, TeeStore, TeeBmpOptions;
procedure TForm1.FormCreate(Sender: TObject);
var GridBand1: TGridBandTool;
Bitmap: TBitmap;
begin
Chart1.AddSeries(TLineSeries.Create(Self)).FillSampleValues;
GridBand1:=TGridBandTool.Create(Self);
GridBand1.Axis:=Chart1.Axes.Bottom;
GridBand1.Band1.Color:=clBlue;
GridBand1.Band2.Color:=clRed;
GridBand1.Band1.Transparency:=50;
GridBand1.Band2.Transparency:=50;
//Bitmap with transparency
Bitmap:=Chart1.TeeCreateBitmap;
Bitmap.SaveToFile('C:\temp\GridBandTest1.bmp');
//Bitmap without transparency
TeeSaveToBitmap(Chart1, 'C:\temp\GridBandTest2.bmp', Chart1.ChartBounds);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Panel color in TChart
Hi Narcís,
the latest maintenance release has not solved the described problem.
Unfortunately I cannot use your proposed workaround. As the users shall still be able to save or print the bitmap by the chart editor.
Best regards
Uli
the latest maintenance release has not solved the described problem.
Unfortunately I cannot use your proposed workaround. As the users shall still be able to save or print the bitmap by the chart editor.
Best regards
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Panel color in TChart
Hi Uli,
Yes, last maintenance release was built the very same day you reported the issue so we didn't have time to investigate it before it was released. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks in advance.
Yes, last maintenance release was built the very same day you reported the issue so we didn't have time to investigate it before it was released. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
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 |
Instructions - How to post in this forum |