Page 1 of 1
Understanding Themes
Posted: Thu Apr 30, 2009 8:44 am
by 9092401
Hi
I couldnt quite find where in the tutorials you have help on themes .
can you please refer me to the correct place. I found the Theme demo in All Features but I dont quite understand the concept and I would like a more indepth understand on the subject
thanks.
Posted: Thu Apr 30, 2009 10:03 am
by 10050769
Hello gcrnd,
There is only example of demo, What's New?\Welcome !\New in Chart Themes\Custom Themes. Please you could say exactly question have you about themes because we can solve your problem.
Moreover, you needs know that themes, allows change properties of the Chart, as for example: aspect, color, color palette etc. Also you can save the changes and use them as Tamplet for other charts.
Thanks,
Posted: Thu Apr 30, 2009 11:18 am
by 9092401
Hi Sandra
I dont have a specific question right now. I want to know where I can learn about working with themes. I want to understand what my possiblities are . Please send me links where I can find the documentation explaining this.
Thanks.
Posted: Thu Apr 30, 2009 11:46 am
by narcis
Hello qcrnd,
Sources of information available about that subject are:
1. Tutorial 12 - Exporting and Importing Charts, specially the TeeChart's 'Ten' template and data export/import format section.
2. Features demo, examples at :
What's New?\Welcome !\New in Chart Themes\Custom Themes
All features\Welcome !\Exporting\Native binary format
All Features\Welcome !\Importing\Chart
All Features\ and All Features\Welcome !\Themes
Tutorials and features demo are available at TeeChart's program group.
Have you looked at all the material? I hope it helps you understand those features.
Posted: Thu Apr 30, 2009 1:15 pm
by 9092401
Hi Narcis
Thanks. I had a look and played around a little. One thing I dont quite understand.
There is option to change theme and color pallete. And when using the Theme editor it works accordingly. however if I try and apply a theme, It seems to change the color pallete as well.
CustomTheme c = new GrayscaleTheme(Chart);
c.Apply();
What do do if I only want to control the chart theme and not change the colors of the series
I want to be able to export to xml Only the Theme and then import the xml.
Currently when doing
Chart.Export.Theme.Save("C:\\theme.xml");
and then doing
Chart.Import.Theme.FromURL("c:\\theme.xml");
it also changes the series colors . I dont want the series colors to change
Thanks.
Posted: Thu Apr 30, 2009 2:40 pm
by narcis
Hi qcrnd,
That's because the themes editor applies a theme and after applies chosen palette. TeeChart's v3/v4 default palette is OperaPalette so you can do something like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
int currentPalette = tChart1.Aspect.ColorPaletteIndex;
Steema.TeeChart.Themes.BlackIsBackTheme blackTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);
blackTheme.Apply();
SaveCustomTheme();
tChart1.Import.Theme.Load(themeDirectory + "\\My Theme.xml");
//Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart1.Chart, Steema.TeeChart.Themes.Theme.OperaPalette);
Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart1.Chart, currentPalette);
}
string themeDirectory = "c:\\temp";
private void SaveCustomTheme()
{
if (!System.IO.Directory.Exists(themeDirectory))
{
System.IO.Directory.CreateDirectory(themeDirectory);
}
tChart1.Export.Theme.Save(themeDirectory + "\\My Theme.xml");
}
Posted: Sun May 03, 2009 5:09 am
by 9092401
Hi Narcis
The problem with your suggestion is that it changes the existing colors. The pallete might be the same , but If I require specific colors for the series and then load the theme , and restore the original pallete the colors still change.
I want to change the theme without affecting the different colors that I have already selected for each series.
I still dont quite understand the logic. Is the Color Pallete part of the theme , or are they seperate issues. If they are seperate then why does the Theme property also change the pallete when I load a new theme
Thanks
Posted: Mon May 04, 2009 8:56 am
by narcis
Hi qcrnd,
Ok, in that case you could create a custom palette from your existing series colors. You'll find an example at All Features\Welcome !\Themes\Custom Palettes in the features demo, available at TeeChart's program group.
Themes include associated color palettes. However, the themes editor lets you choosing different palettes for each theme as their are applied after having loaded the theme as in the code I posted before.