Understanding Themes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Understanding Themes

Post by qcrnd » Thu Apr 30, 2009 8:44 am

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.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Thu Apr 30, 2009 10:03 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Post by qcrnd » Thu Apr 30, 2009 11:18 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Apr 30, 2009 11:46 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Post by qcrnd » Thu Apr 30, 2009 1:15 pm

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Apr 30, 2009 2:40 pm

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");
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Post by qcrnd » Sun May 03, 2009 5:09 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon May 04, 2009 8:56 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply