I was wondering if ErrorYPlus and ErrorYMinus were somehow reversed? It seems to go in the opposite intuitive direction of ErrorXPlus and ErrorXMinus.. I wrote a small program to demonstrate it...
Code: Select all
//Initializechart
lightningChartUltimate1.BeginUpdate();
//GetXYview
ViewXY chartView = lightningChartUltimate1.ViewXY;
//Getdefaultx-axisandsettherangeandValueType
AxisX axisX = chartView.XAxes[0];
axisX.SetRange(0, 2);
axisX.ValueType = AxisValueType.Number;
//Getdefaulty-axisandsettherange.
AxisY axisY = chartView.YAxes[0];
axisY.SetRange(0, 3.5);
//Addpointlineseries
PointLineSeries pls = new PointLineSeries(chartView, axisX, axisY);
pls.PointsVisible = true;
pls.LineVisible = false;
pls.ErrorBars.ShowYError = true;
pls.ErrorBars.ShowXError = true;
pls.ErrorBars.EndLength = 20;
pls.ErrorBars.YColor = Colors.WhiteSmoke;
pls.ErrorBars.XColor = Colors.WhiteSmoke;
SeriesErrorPoint[] aPoints = new[]
{
new SeriesErrorPoint() {ErrorYMinus = 0.68999, ErrorYPlus = 0.87368, X = 1, Y = 2.20498, ErrorXMinus = 0.6547, ErrorXPlus = 0.345}
};
pls.PointsType = PointsType.ErrorPoints;
//Assignthedataforthepointlineseries
pls.PointsWithErrors = aPoints;
//AddseriestothePointLineSeriescontainerintheview
chartView.PointLineSeries.Add(pls);
//Applychartpropertychanges,whichcausescharttobepainted
lightningChartUltimate1.EndUpdate();
Unless, am I supposed to be thinking of ErrorYPlus and ErrorYMinus in screen coordinates instead of regular y coordinates (which has them reversed...) I am ok with using it this way, but wanted to make sure I wasn't confused as to how this worked!
Also, hopefully this post will help if anyone else got confused by this....
[img] [/img]
As you can see, the error bars on the x Axis go from about .35 to 1.35, but the y axis seems to go the other direction...
Thanks
Chris