Page 1 of 1

Red Edges for barchart

Posted: Wed Feb 24, 2010 10:20 pm
by 13048857
Hello, I noticed something a while ago and I've been wondering whether it is my fault or not, but I'm pretty sure I'm not doing anything wrong here now,
forSteemaRedEdges.jpg
Image that compares the two charts
forSteemaRedEdges.jpg (139.16 KiB) Viewed 10122 times
In the image you can see charts that are produced by different versions of the steema library (versions at the bottom) but with the same code.

all barcharts in the later version appear with a red edge instead of the nice previous edge. What change between versions? what can I do to have the edge not change to red, but stay as it was?

thanks

Re: Red Edges for barchart

Posted: Thu Feb 25, 2010 11:45 am
by 10050769
Hello Thomasin,
What change between versions?
I could reproduce your problem using last version 3 and last version 4 of TeeChart. Net, and I have added it in list of bug report with number [TF02014698] we will try to fix it for the next version of TeeChart .Net.
what can I do to have the edge not change to red, but stay as it was?
Also, I found a workaround that you could use with similar code in your application. Please, check next code works if you want.

Code: Select all

   public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Bar bar1, bar2,bar3;
        private void InitializeChart()
        {
            tChart1.Dock = DockStyle.Fill;
            bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar2 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar3 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar1.FillSampleValues();
            bar2.FillSampleValues();
            bar3.FillSampleValues();
            bar1.StackGroup = 0;
            bar2.StackGroup = 1;
            bar3.StackGroup = 1;
            bar2.MultiBar = Steema.TeeChart.Styles.MultiBars.Stacked;
            bar1.Marks.Visible = false;
            bar2.Marks.Visible = false;
            bar3.Marks.Visible = false;
            bar1.Color = Color.Blue;
            bar1.Brush.Transparency = 40;
            bar2.Color = Color.Green;
            bar2.Brush.Transparency = 40;
            bar3.Color = Color.White;
            bar3.Brush.Transparency = 40;
            //------Workaround--------//
            bar1.Pen.Color = bar1.Color;
            bar2.Pen.Color = bar2.Color;
            bar3.Pen.Color = bar3.Color;

        }
I hope will helps.

Thanks,

Re: Red Edges for barchart

Posted: Wed Mar 24, 2010 10:38 am
by 10050769
Hello Thomasin,

After, we having checked issue with number [TF02014698], we believe that it is not a bug, because TeeChart.net changes the pen color of the series only the first time the series is rendered, this behaviour forms part of the default theme.

But, you can obtain same as you want to be doing next:
bar1.Pen.Color = bar1.Color;
bar2.Pen.Color = bar2.Color;
bar3.Pen.Color = bar3.Color;
Thanks,

Re: Red Edges for barchart

Posted: Wed Mar 24, 2010 5:35 pm
by 14045174
I am not sure why you tell it is not a bug? I had created my report using prior version of TChart, than upgraded to the new version and print the report... The borders are ugly red and the bars are positioned differently. In my case, I am reading all the chart settings from a template file and expect the charts to be exactly the same to the last pixel (with an exception to the real bug fixes, like shadow drawing).

Re: Red Edges for barchart

Posted: Thu Mar 25, 2010 9:53 am
by Chris
UserLS wrote:I am not sure why you tell it is not a bug? I had created my report using prior version of TChart, than upgraded to the new version and print the report... The borders are ugly red and the bars are positioned differently. In my case, I am reading all the chart settings from a template file and expect the charts to be exactly the same to the last pixel (with an exception to the real bug fixes, like shadow drawing).
Yes indeed, the question is what is to be considered a "real" bug fix and what isn't. TeeChart's development team obviously have to make calls on this when it comes to bugfixing and these calls are based on the client's needs reflected in the Bug report and on what can be described as "internal consistency".

TeeChart's development team do not introduce bugs deliberately into the TeeChart code. They are mistakes. The team is composed of human beings, and we make mistakes. You will have to forgive us for this :-)

In the case in hand, you may like to consider the following scenario:

Code: Select all

    private Steema.TeeChart.Styles.Bar bar1;
    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
      bar1.FillSampleValues();
      bar1.Pen.Width = 3;
      bar1.Pen.Color = Color.Red;
      bar1.Color = Color.Yellow;
    }
What colour would you expect the Bar.Pen to be in this situation? We would expect it to be Red. Unfortunately, when you created your *.ten file, there was a defect in TeeChart which changed the Pen.Color to Yellow in the above situation. That is why you are seeing the effect that you are seeing.

We are very sorry for these circumstances as they were caused by us. Please accept our apologies.