Hello,
We have a problem changing series colors using the teechart properties pop up.
we use teechart 7 activex
I have uploaded a file (problem.zip) with a small project that display the problem.
To recreate the problem:
1. run the project
2. press on "select tee" and select the tee file that is also in the uploaded zip file.
3. press on the properties icon to open the properties pop up.
4. press on the color squere near the Violation and complient series and change thier colors.
you can see that the color on the legend is changed but the color on the chart stays the same.
Is this a know issue? Is there a solution?
Thanks
Zoe.
bars colors are not changing
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
This is because all bars in "Violation" series have a value of zero. You'll notice that if you go to the "Data" tab in the editor and press the "X" icon on the bottom right. At the editor, if you change bar values you'll see they are visible in the color you selected.
This is because all bars in "Violation" series have a value of zero. You'll notice that if you go to the "Data" tab in the editor and press the "X" icon on the bottom right. At the editor, if you change bar values you'll see they are visible in the color you selected.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
With your *.tee file we can not see how did you generated the chart so we image that the problem could be that you are a assigning a color to each point when adding data to the series. Therefore you can not change series color if each point has been assigned a color individually.
So that it works as you request you should use clTeeColor constant as the color in the Add method when populating your series. Then you could set series color using like TChart1.Series(0).Color=clRed. Proceeding like this would also let you change series's colors in the editor.
With your *.tee file we can not see how did you generated the chart so we image that the problem could be that you are a assigning a color to each point when adding data to the series. Therefore you can not change series color if each point has been assigned a color individually.
So that it works as you request you should use clTeeColor constant as the color in the Add method when populating your series. Then you could set series color using like TChart1.Series(0).Color=clRed. Proceeding like this would also let you change series's colors in the editor.
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 |
Hi Narcis,
Actually, the "color each" propertie is set to false.
We create the actual serie using this code (only part of the code is displayed here):
chart->AddSeries(TeeChart::scBar);
TeeChart::ISeriesPtr series;
series = chart->aSeries[seriesNum];
series->ColorEachPoint = FALSE;
series->Color = color;
and we fill the series using this code (again only part of it):
chart->aSeries[seriesNum]->Add(dValue, label.c_str(), color);
as you can see, we do pass the color parameter but this is becase we did not manage to find any Add method that does not ask for color. Does this affect the chart even though coloreachpoint is set to false? Is there an add method that we do not need to pass color to?
thanks
Zoe
Actually, the "color each" propertie is set to false.
We create the actual serie using this code (only part of the code is displayed here):
chart->AddSeries(TeeChart::scBar);
TeeChart::ISeriesPtr series;
series = chart->aSeries[seriesNum];
series->ColorEachPoint = FALSE;
series->Color = color;
and we fill the series using this code (again only part of it):
chart->aSeries[seriesNum]->Add(dValue, label.c_str(), color);
as you can see, we do pass the color parameter but this is becase we did not manage to find any Add method that does not ask for color. Does this affect the chart even though coloreachpoint is set to false? Is there an add method that we do not need to pass color to?
thanks
Zoe
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
No, instead of passing "color" try passing "clTeeColor".
No, instead of passing "color" try passing "clTeeColor".
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 |