Page 1 of 1

Incorrect legend color for the Candle series

Posted: Tue May 01, 2007 1:39 am
by 9643227
It seems to me that the color of the series points shown in the legend box of a Candle series does not match the color of the candles.

Jeff

Posted: Wed May 02, 2007 8:14 am
by 9348258
Hi Jeff

Thanks for letting us know, I could reproduce the issue here and this seems to be a bug. I've added it (TF02012194) to our defect list to be fixed for future releases.

Re: TChart not good at visualising uncertainty

Posted: Wed Apr 06, 2011 11:29 pm
by 13046874
Dear Edu
As you can see, this problem has been around for many years now (this one was posted in 2007 and the problem is still there).
Edu wrote:Hi Jeff

Thanks for letting us know, I could reproduce the issue here and this seems to be a bug. I've added it (TF02012194) to our defect list to be fixed for future releases.
I'm quite hampered by this problem for many years now (seeking shelter in candle series from the ill-designed single box-whisker approach to visualise uncertainties) . Any idea if/when this one could be resolved?

Regards
Francis Pantus

Re: Incorrect legend color for the Candle series

Posted: Thu Apr 07, 2011 2:17 pm
by 10050769
Hello Francis,

Using next code and last version of TeeChart.Net it works fine for me, so the bug with number TF02012194 is fixed:

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Candle Series1;
        private void InitializeChart()
        {
            Series1 = new Steema.TeeChart.Styles.Candle(tChart1.Chart);
            Series1.FillSampleValues();
            Series1.DownCloseColor = Color.Red;
            Series1.UpCloseColor = Color.Blue;
        }
And achieve next image:
CandleExample.jpg
CandleExample.jpg (97.32 KiB) Viewed 15588 times
Could you tell us which version are you using now?

Thanks,

Re: Incorrect legend color for the Candle series

Posted: Tue May 17, 2011 11:41 pm
by 16059352
Hi Sandra,
I installed the latest version this morning (TeeChartNET2010VSNET2008_4.1.2011.04192.exe) and the problem is still as it was when I first reported the problem.
See attached file with image: legend for candle is orange, candle is blue.

The code I'm using:

Code: Select all

            LineSerie = New Steema.TeeChart.Styles.Line
            LineSerie.Title = tracename
            LineSerie.OutLine.Width = 1
            LineSerie.OutLine.Visible = m_ChartSettings.m_Outline
            CurTChrt.Series.Add(LineSerie)

            CndlSerie = New Steema.TeeChart.Styles.Candle
            ' insert line after candle so it show up in front of it
            CndlSerie.Title = tracename + "StDev"
            CndlSerie.UpCloseColor = LineSerie.Color
            CndlSerie.DownCloseColor = LineSerie.Color
            CalcCustumLeftAxes(CurTChrt)
            CurTChrt.Series.Add(CndlSerie)

Cheers
Francis Pantus

Re: Incorrect legend color for the Candle series

Posted: Fri May 20, 2011 9:57 am
by yeray
Hello Francis,

Let me try to explain:
When the legend shows the values, the symbols in the legend are drawn according to the Open/Close values in each point. So the UpCloseColor/DownCloseColor are used here.
However, when the legend shows the series names, what color has to be shown, UpCloseColor or DownCloseColor? TeeChart doesn't make this decision for you so the color set in Series.Color is taken to draw the series symbol.
Doesn't it sound logic for you? What's the behavior you'd expect?

Re: Incorrect legend color for the Candle series

Posted: Tue Jun 14, 2011 12:05 am
by 16059352
Thanks for the lecture, Yeray. I hope you were able to see the picture of the graph with the two series on it and the 'wrong' legend color for the candle series? As fas as I can see I make all colors the same as the color of the line series (see my code) .
Can you please tell me how to change the code so that the legend reflects the same color as the candle series?
Cheers
Francis

Re: Incorrect legend color for the Candle series

Posted: Wed Jun 15, 2011 2:10 pm
by 10050769
Hello Francis,

You need change the color to property of Candle Candle.Color too, so not enough just changing the color of UpCloseColor and DownCloseColor. You can do something as next:

Code: Select all

    private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tracename = "LineSeries11";
            LineSeries = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            LineSeries.Title = tracename;
            LineSeries.OutLine.Width = 1;
            LineSeries.FillSampleValues();
            
            CndlSeries = new Steema.TeeChart.Styles.Candle(tChart1.Chart);
            // insert line after candle so it show up in front of it
            CndlSeries.Title = tracename + "StDev";
            CndlSeries.Color= LineSeries.Color;
            CndlSeries.UpCloseColor = LineSeries.Color;
            CndlSeries.DownCloseColor = LineSeries.Color;
            CndlSeries.FillSampleValues();
        }
Please, could you tell us if previous code solve your problem?

I hope will helps.

Thanks,

Thanks,

Re: Incorrect legend color for the Candle series

Posted: Tue Jun 28, 2011 7:25 pm
by 16059352
Hi Sandra,
That worked indeed and solved a very nagging problem, with many thanks for your help!!

Cheers
Francis

Re: Incorrect legend color for the Candle series

Posted: Wed Jun 29, 2011 7:52 am
by 10050769
Hello FP_Oz,

I am glad that the previous solution works for you. :)

Thanks,