Page 1 of 1
Problem with ErrorBar
Posted: Mon Apr 16, 2012 1:55 pm
by 15660013
Hi,
I'm using TeeChart 4.1.2011.7281 for .Net 2.0 with Visual Studio 2010.
In my ErrorBar.ErrorValues i have negative and positive values. The positive values are displayed right as I supposed (the "T" is on top of the bar).
I assumed that negative values would be displayed as a downwards drawn "T".
--> Unfortunately they are also drawn on top of the ErrorBar.
does the ErrorBar not provide this functionality or is it a bug?
best regards,
Christopher
Re: Problem with ErrorBar
Posted: Mon Apr 16, 2012 3:47 pm
by 10050769
Hello Christoper,
I suggest you change ErrorStyle property to TopBottom as do in next line of code:
Code: Select all
errorBarSeries1.ErrorStyle = ErrorStyles.TopBottom;
Can you tell us if previous line of code works as you expect?
Thanks,
Re: Problem with ErrorBar
Posted: Tue Apr 17, 2012 6:59 am
by 15660013
Hi, if I set:
Code: Select all
errorBarSeries1.ErrorStyle = ErrorStyles.TopBottom;
The "T" is always drawn upwards and downwards, no matter if the given value is positive or negative.
I would like to draw the "T" downwards if the given value is negative and upwards if not!
regards,
Christopher
Re: Problem with ErrorBar
Posted: Wed Apr 18, 2012 3:21 pm
by 10050769
Hello Christoper,
I suggest you do something as next code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Random rnd = new Random();
Steema.TeeChart.Styles.ErrorBar errorBar = new Steema.TeeChart.Styles.ErrorBar(tChart1.Chart);
Steema.TeeChart.Styles.ErrorBar errorBar1 = new Steema.TeeChart.Styles.ErrorBar(tChart1.Chart);
errorBar.ErrorStyle = ErrorStyles.Top;
errorBar.HorizAxis = HorizontalAxis.Bottom;
errorBar1.ErrorStyle = ErrorStyles.Bottom;
errorBar1.HorizAxis = HorizontalAxis.Bottom;
//
errorBar1.Pen.Color = errorBar.Pen.Color;
errorBar1.Color = errorBar.Color;
errorBar.ErrorPen.Color = errorBar.ErrorPen.Color;
for (int i = 0; i <= 10; i++)
{
//Error Bar Series
if (i < 5)
{
errorBar.Add(i, rnd.Next(100), 10);
}
else
{
errorBar1.Add(i, rnd.Next(100),-10);
}
}
}
Can you tell us if previous code works as you expect?
Thanks,