I have created 3 Bar series to add all into the same tChart control.
I assign the colors (x.Color property) to each of them as follows:
bar1.Color = Color.Black
bar2.Color = Color.Green
bar3.Color = Color.Red
When I add these 3 series to the tChart and display the bar chart, bar1 is NOT black. It appears to be some sort of Gray/Blue color. When I inspect the color of the series while debugging, the ARGB is 255,68,102,163.
If I bring up the chart editor for this tChart and change the series color to black, it will display properly as black.
Any reason or idea why the black color assignment appears to not work properly?
Bar Series Color Issue?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aaron,
This works fine for me here using latest TeeChart for .NET v3 maintenance release available at the client area either creating series at designtime or runtime:
Which TeeChart version are you using? Can you modify code snippet above for us to reproduce the issue here?
Thanks in advance.
This works fine for me here using latest TeeChart for .NET v3 maintenance release available at the client area either creating series at designtime or runtime:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
Steema.TeeChart.Styles.Bar bar2 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
Steema.TeeChart.Styles.Bar bar3 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.Color = Color.Black;
bar2.Color = Color.Green;
bar3.Color = Color.Red;
bar1.FillSampleValues();
bar2.FillSampleValues();
bar3.FillSampleValues();
}
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 |
-
- Newbie
- Posts: 29
- Joined: Wed Jun 20, 2007 12:00 am
Thanks for the quick reply Narcis.
Unfortunately, we are still running on v3.2.2945.19738 since that was the last version that did NOT give us memory issues with exceptionally large data series.
Your code works for me.
The difference between yours and mine was in the calls to the constructor.
I had
Steema.TeeChart.Styles.Bar newBar1 = new Steema.TeeChart.Styles.Bar();
which did not include the Chart as a parameter.
When I add the Chart as a parameter into the constructor call, the Black will show up just fine. All other colors worked but the Black would not appear correctly.
Thanks for the help on this one!
Unfortunately, we are still running on v3.2.2945.19738 since that was the last version that did NOT give us memory issues with exceptionally large data series.
Your code works for me.
The difference between yours and mine was in the calls to the constructor.
I had
Steema.TeeChart.Styles.Bar newBar1 = new Steema.TeeChart.Styles.Bar();
which did not include the Chart as a parameter.
When I add the Chart as a parameter into the constructor call, the Black will show up just fine. All other colors worked but the Black would not appear correctly.
Thanks for the help on this one!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aaron,
You're welcome.
You're welcome.
I remember we had that conversation before. We will be glad to look at the issue if you find a consistent way to reproduce it and send us a simple example project we can run "as-is" reproducing those problems.Unfortunately, we are still running on v3.2.2945.19738 since that was the last version that did NOT give us memory issues with exceptionally large data series.
Using current version code below also works fine:Your code works for me.
The difference between yours and mine was in the calls to the constructor.
I had
Steema.TeeChart.Styles.Bar newBar1 = new Steema.TeeChart.Styles.Bar();
which did not include the Chart as a parameter.
When I add the Chart as a parameter into the constructor call, the Black will show up just fine. All other colors worked but the Black would not appear correctly.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar();
Steema.TeeChart.Styles.Bar bar2 = new Steema.TeeChart.Styles.Bar();
Steema.TeeChart.Styles.Bar bar3 = new Steema.TeeChart.Styles.Bar();
bar1.Color = Color.Black;
bar2.Color = Color.Green;
bar3.Color = Color.Red;
bar1.FillSampleValues();
bar2.FillSampleValues();
bar3.FillSampleValues();
tChart1.Series.Add(bar1);
tChart1.Series.Add(bar2);
tChart1.Series.Add(bar3);
}
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 |
-
- Newbie
- Posts: 29
- Joined: Wed Jun 20, 2007 12:00 am
If I ever get a sample app that will reproduce this, you will be the first to know.narcis wrote: I remember we had that conversation before. We will be glad to look at the issue if you find a consistent way to reproduce it and send us a simple example project we can run "as-is" reproducing those problems.
I have tried to generate something that would show the same behavior as our application but have had no success thus far.
I have not had a tremendous amount of time to work on producing a sample app recently and it has not been a priority since the Jan 24th 2008 version works fine for us for the time being.
I hate not being able to upgrade to the latest version but the memory problems we have encountered make upgrading not an option until I can figure out what I have done that causes problems in the new versions or until such time that I can generate a sample app to show you what we are seeing.
After our upcoming release at the end of January, I may have some time dedicated to trying to determine the root of this memory issue. I will let you know what I find.
Thanks again.