Reputation: 1879
In one of my windows application, wherein I am using TChart for .Net 2010, I am displaying a chart with 3 error series on it. Each of these series have 2 points. X points for all these series are identical. e.g. Series1 has Point1(x1=0.2, bar=0, StdErr=5) & Point2(x1=0.6, bar=1, StdErr=8) whereas Series2 has Point1(x1=0.2, bar=0, StdErr=8) & Point2(x1=0.6, bar=1, StdErr=10).
The expected chart should display overlapped error bars at 2 locations 0.2 and 0.6 on x axis. But in fact, it displaying error bars with sufficient separation between them.
Is this a problem with TChart or do I need to have some settings to overlap these error bars? Please let me know if anyone has solution for it.
thanks, kapil
Upvotes: 0
Views: 622
Reputation: 7452
This is not a TeeChart problem but default behaviour. All series deriving from Steema.TeeChart.Styles.CustomBar class have MultiBar property which lets the programmer choose how bars will be plotted in such circumstances. By default MultiBar is set to Steema.TeeChart.Styles.MultiBars.Side. Setting it to Steema.TeeChart.Styles.MultiBars.None solves your problem, for example:
tChart1.Aspect.View3D = false;
for (int i = 0; i < 3; i++)
{
Steema.TeeChart.Styles.ErrorBar errorBar = new Steema.TeeChart.Styles.ErrorBar(tChart1.Chart);
errorBar.MultiBar = Steema.TeeChart.Styles.MultiBars.None;
errorBar.FillSampleValues();
}
If that's not what you were looking for you can try with different MultiBar settings and let us know if it still doesn't fit your needs.
Upvotes: 2