Hi
I am wondering if it is possible to do some form of error bar on a bar chart.
The kind of thing I am thinking of is a normal bar chart, with an error band at the top - but I am open to suggestions. I don't seem to be able to locate any tutorials on adding error bars to a plot series either, but that may well be me being thick...
TIA for the help
Bernie
Error Bars on Bar Chart
Re: Error Bars on Bar Chart
Hello Bernie,
TeeChart.Net gives you a series specially for do you want. I recommend you take a look to a Demo of TeeChart.Net concretely in t he example:All Features\Welcome!\Chart styles\Statistical\Error Bar
I hope will helps.
Thanks,
TeeChart.Net gives you a series specially for do you want. I recommend you take a look to a Demo of TeeChart.Net concretely in t he example:All Features\Welcome!\Chart styles\Statistical\Error Bar
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 |
Instructions - How to post in this forum |
Re: Error Bars on Bar Chart
Ok, I missed that one. It's ok, and it'll do for a start, but what I really wanted to do was something akin to the image attached (edited in PSP from your example)...
You'll note I've modified the 2nd bar to have upper and lower error bands. Is this as simple as using a Bar series then adding adding a second error series? How would I get different upper and lower error bands?
TIA....
Bernie
You'll note I've modified the 2nd bar to have upper and lower error bands. Is this as simple as using a Bar series then adding adding a second error series? How would I get different upper and lower error bands?
TIA....
Bernie
- Attachments
-
- Desired ErrorBar Format.png (13.59 KiB) Viewed 7613 times
Re: Error Bars on Bar Chart
I've also just noticed that the legend is now using the error bar shape and colour - is there any way of changing it back to display a square block of Bar colour?
Bernie
Bernie
Re: Error Bars on Bar Chart
Ok, I've found the .ErrorStyle property that seems to do what I need.
Still haven't found a way of turning the legend back the way I want it though...
Still haven't found a way of turning the legend back the way I want it though...
Re: Error Bars on Bar Chart
Hi porterbe,
If you want, you can customize the legend symbols as in the example at All Features\Welcome !\Miscellaneous\Legend\OnDrawSymbol Event
Do you mean that the Error Bar series showed a square in the legend in a previous version? I can see the same in TeeChart for NET v3 and v2.porterbe wrote:the legend is now using the error bar shape and colour - is there any way of changing it back to display a square block of Bar colour?
If you want, you can customize the legend symbols as in the example at All Features\Welcome !\Miscellaneous\Legend\OnDrawSymbol Event
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Error Bars on Bar Chart
When I used a standard bar series, my legend looked like the image BarLegend.png
With a ErrorBar series, my legend looks like the image ErrorBarLegend.png.
I want the error bars in ErrorBarLegend.png, but with the Legend from BarLegend.png. Can I get this?Re: Error Bars on Bar Chart
Hello Bernie,
I think you can do something as next example:
Could you please, tell us if this code works as you want?
I hope will helps.
Thanks,
I think you can do something as next example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.ErrorBar series1 = new Steema.TeeChart.Styles.ErrorBar(tChart1.Chart);
Steema.TeeChart.Styles.ErrorBar series2 = new Steema.TeeChart.Styles.ErrorBar(tChart1.Chart);
Steema.TeeChart.Styles.ErrorBar series3 = new Steema.TeeChart.Styles.ErrorBar(tChart1.Chart);
series1.Add(0, 123, 23);
series2.Add(1, -432, 65);
series3.Add(2, 88, 13);
series1.Add(4, 222, 44);
series1.ErrorPen.Color = Color.Blue;
series1.Color = Color.Red;
series2.ErrorPen.Color = Color.Blue;
series2.Color = Color.Red;
series3.ErrorPen.Color = Color.Blue;
series3.Color = Color.Red;
series1.ErrorStyle = Steema.TeeChart.Styles.ErrorStyles.TopBottom;
series2.ErrorStyle = Steema.TeeChart.Styles.ErrorStyles.Bottom;
series3.ErrorStyle = Steema.TeeChart.Styles.ErrorStyles.Top;
tChart1.Legend.Symbol.OnSymbolDraw += new Steema.TeeChart.SymbolDrawEventHandler(Symbol_OnSymbolDraw);
}
void Symbol_OnSymbolDraw(object sender, Steema.TeeChart.SymbolDrawEventArgs e)
{
Rectangle tmpR = e.Rect;
tChart1.Chart.Graphics3D.Rectangle(tmpR);
}
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 |
Instructions - How to post in this forum |
Re: Error Bars on Bar Chart
That'll do the job, thank you .
I had come to a similar conclusion, but I was struggling with how to fill the rectangle. Now I know!
I had come to a similar conclusion, but I was struggling with how to fill the rectangle. Now I know!