I noticed that stacked area series don't color correctly when generated in code. the entire stack gets the color of the last area series added.
I am new to the Teechart library and I may have missed something, but I spent several hours trying to figure out what to do and have each series a separate color, as works when using the Teechart editor.
Perhaps, I missed something obvious.
I am using Teechart v3. in VS2005
Colors of stacked area series all the same
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi HarryM,
I'm not able to reproduce the problem here using the code below. Could you please try if the code works fine at your end and modify it or send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance!
I'm not able to reproduce the problem here using the code below. Could you please try if the code works fine at your end and modify it or send us a simple example project we can run "as-is" to reproduce the problem here?
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
Steema.TeeChart.Styles.Area area1;
for (int i = 0; i < 5; i++)
{
area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
area1.FillSampleValues();
area1.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;
}
}
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 |
your sample works, but...
Thanks Narcis for looking into my little problem so quickly.
I have uploaded a RemObjects Chrome project (I hope that this not too much of a problem) wich I used for testing again and again without luck.
I translated your code sample into Chrome and it works well. The problem is when not using the the FillSamples method, and trying to add data programatically. There must be a way to tell each series to use a unique color. I just don't know where to look.
I have uploaded a RemObjects Chrome project (I hope that this not too much of a problem) wich I used for testing again and again without luck.
I translated your code sample into Chrome and it works well. The problem is when not using the the FillSamples method, and trying to add data programatically. There must be a way to tell each series to use a unique color. I just don't know where to look.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi HarryM,
Thanks for the example project. The problem with it is the UseOrigin property you have to set it to false or set a value for the Origin property as well, for example:
The same applies to MArea2.
Hope this helps!
Thanks for the example project. The problem with it is the UseOrigin property you have to set it to false or set a value for the Origin property as well, for example:
Code: Select all
MArea1.UseOrigin:=true;
MArea1.Origin:=500;
Hope this helps!
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 |
Ok, i get it now
Thanks for helping me on this one. I think i know better now.
Looks like it is going to work.
Looks like it is going to work.