Hi,
I tried to change the color of the fastline series like
m_chart2.Series(0).GetPen().SetColor(RGB(255,0,0));
m_chart2.Series(1).GetPen().SetColor(RGB(128,128,128));
m_chart2.Series(2).GetPen().SetColor(RGB(0,0,255));
And the series colors can be changed correctly. Now the problem is the legend. The item colors in the legend seem to maintain the default ones. How to change legend color according to series color?
Thank you,
David
How to change legend color according to series color
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
This is default behaviour and works fine for me here using TeeChart Pro v7.0.0.8 maintenance release using this code:
This is default behaviour and works fine for me here using TeeChart Pro v7.0.0.8 maintenance release using this code:
Code: Select all
m_Chart1.AddSeries(scFastLine);
m_Chart1.AddSeries(scFastLine);
m_Chart1.AddSeries(scFastLine);
m_Chart1.Series(0).FillSampleValues(10);
m_Chart1.Series(1).FillSampleValues(10);
m_Chart1.Series(2).FillSampleValues(10);
m_Chart1.Series(0).GetPen().SetColor(RGB(255,0,0));
m_Chart1.Series(1).GetPen().SetColor(RGB(128,128,128));
m_Chart1.Series(2).GetPen().SetColor(RGB(0,0,255));
m_Chart1.AboutBox();
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 David,
Thanks for the information.
Now I could reproduce the problem and added it (TA05011509) to our bug list to be fixed for future releases.
Thanks for the information.
Now I could reproduce the problem and added it (TA05011509) to our bug list to be fixed for future releases.
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 David,
As an udpate,
We have been reviewing the issue here and think it's not a bug. You should use this code:
You need to use Series.Color instead of Series.Pen.Color to achieve what you request as for example, using line series, you can have different color settings for series brush (Series.Color) and Series.Pen.Color.
As an udpate,
We have been reviewing the issue here and think it's not a bug. You should use this code:
Code: Select all
TChart1.AddSeries scFastLine
TChart1.AddSeries scFastLine
TChart1.AddSeries scFastLine
TChart1.Series(0).FillSampleValues 10
TChart1.Series(1).FillSampleValues 10
TChart1.Series(2).FillSampleValues 10
TChart1.Series(0).Color = RGB(255, 0, 0)
TChart1.Series(1).Color = RGB(128, 128, 128)
TChart1.Series(2).Color = RGB(0, 0, 255)
TChart1.Legend.FontSeriesColor = True
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 |