Page 1 of 1
When Save layout the changed series color is loosed.
Posted: Mon May 19, 2008 12:41 pm
by 9637269
Hi support,
I want to know if is possible preserve the layout when I change the color in a Pie,
I changed colors for any data and save the layout but colors are not preserved.
There is a way to do days?
Is supported by the object?
Bellow the example:
for (int i = 0; i < TeeChartObject.Series[0].Count; i++)
{
TeeChartObject.Series[0].Color = SET Color
}
And after that I save layout.
Thank in advance for any suggestion.
Requena Claudio
ANZANI TRADING GROUP
Posted: Mon May 19, 2008 1:26 pm
by narcis
Hi Claudio,
I'm sorry but I don't understand which is your exact problem. Would you be so kind to 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: Tue May 20, 2008 12:08 pm
by 9637269
Hi support,
I send a example file uploading the file to your server from your web page
the file name is 'ATG_TeeChartPieSample.zip'
To reproduce this issue follows the steps:
Case 1 BAR is OK
Click button 'BAR Load Data'
Change the theme and color serie
Click button 'BAR Save layout'
close the application
Reload application
Click button 'BAR Load Data'
Click button 'BAR Load layout'
Case 2 PIE Error
Click button 'PIE Load Data'
Change the theme
Click button 'PIE Change color'
Change colors in the new opened form
Click button 'PIE Save layout'
close the application
Reload application
Click button 'PIE Load Data'
Click button 'PIE Load layout'
In the PIE case the colors are not preserve and the theme
change the colors randomly.
Is the code correctly writhed for load layouts or I miss some thing?
Is a bug in the teeChart Object or is not supported for the PIE case?
Thanks in advance for any help.
Requena Claudio
ANZANI TRADING GROUP
Posted: Tue May 20, 2008 3:20 pm
by narcis
Hi Claudio,
Thanks for the example project.
This is because when saving bar series color you are saving a color for all points in the series. While you are setting pie slices color you are setting a specific color for each pie slice. Then, you are not including data when saving the chart template. Moreover, you are repopulating series every time you load a template file without adding a color to each point.
To solve your issue you should:
1. Save template file with data and don't repopulate series when loading it.
2. When loading a template file populate series using the colors you assigned to each point, eg.: pie1.Add(x,y,color).
Hope this helps!
Posted: Tue May 20, 2008 3:33 pm
by 9637269
Hi support,
And is possible read the color from the saved template in order to set
each point with the correctly color?
Thanks in advance.
Requena Claudio
ANZANI TRADING GROUP
Posted: Tue May 20, 2008 3:43 pm
by narcis
Hi Claudio,
Yes, this is possible if you save data on it. Otherwise you could try exporting TeeChart's data to an XML file and load that xml file.