Page 1 of 1
Bar Series Color Issue?
Posted: Thu Dec 18, 2008 3:08 pm
by 14045609
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?
Posted: Thu Dec 18, 2008 3:18 pm
by narcis
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:
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();
}
Which TeeChart version are you using? Can you modify code snippet above for us to reproduce the issue here?
Thanks in advance.
Posted: Thu Dec 18, 2008 3:43 pm
by 14045609
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!
Posted: Thu Dec 18, 2008 4:00 pm
by narcis
Hi Aaron,
You're welcome.
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.
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.
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.
Using current version code below also works fine:
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);
}
Posted: Thu Dec 18, 2008 4:12 pm
by 14045609
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.
If I ever get a sample app that will reproduce this, you will be the first to know.
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.