Red Edges for barchart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
THoMaSiN
Newbie
Newbie
Posts: 36
Joined: Mon Apr 14, 2008 12:00 am

Red Edges for barchart

Post by THoMaSiN » Wed Feb 24, 2010 10:20 pm

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 9097 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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Red Edges for barchart

Post by Sandra » Thu Feb 25, 2010 11:45 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Red Edges for barchart

Post by Sandra » Wed Mar 24, 2010 10:38 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Re: Red Edges for barchart

Post by UserLS » Wed Mar 24, 2010 5:35 pm

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).

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Red Edges for barchart

Post by Christopher » Thu Mar 25, 2010 9:53 am

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply