Incorrect legend color for the Candle series
Incorrect legend color for the Candle series
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
Jeff
Re: TChart not good at visualising uncertainty
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).
Regards
Francis Pantus
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).
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?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.
Regards
Francis Pantus
Re: Incorrect legend color for the Candle series
Hello Francis,
Using next code and last version of TeeChart.Net it works fine for me, so the bug with number TF02012194 is fixed:
And achieve next image:
Could you tell us which version are you using now?
Thanks,
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;
}
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Incorrect legend color for the Candle series
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:
Cheers
Francis Pantus
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
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?
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?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Incorrect legend color for the Candle series
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
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
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:
Please, could you tell us if previous code solve your problem?
I hope will helps.
Thanks,
Thanks,
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();
}
I hope will helps.
Thanks,
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Incorrect legend color for the Candle series
Hi Sandra,
That worked indeed and solved a very nagging problem, with many thanks for your help!!
Cheers
Francis
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
Hello FP_Oz,
I am glad that the previous solution works for you.
Thanks,
I am glad that the previous solution works for you.
Thanks,
Best Regards,
Sandra Pazos / 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 |