public override void SetData(Point hlpoint, Point hrpoint, Point vtpoint, Point vbpoint) { _horLeftpoint = new ChartPoint(hlpoint.X, hlpoint.Y); _horRightpoint = new ChartPoint(hrpoint.X, hrpoint.Y); _verToppoint = new ChartPoint(vtpoint.X, vtpoint.Y); _verBottompoint = new ChartPoint(vbpoint.X, vbpoint.Y); switch (_parentSeries.Mode) { case ErrorBarMode.Horizontal: XRange = new DoubleRange(ChartMath.Min(hlpoint.X, hrpoint.X), ChartMath.Max(hlpoint.X, hrpoint.X)); YRange = DoubleRange.Empty; break; case ErrorBarMode.Vertical: YRange = new DoubleRange(vbpoint.Y, vtpoint.Y); XRange = DoubleRange.Empty; break; default: XRange = new DoubleRange(ChartMath.Min(hlpoint.X, hrpoint.X), ChartMath.Max(hlpoint.X, hrpoint.X)); YRange = new DoubleRange(vbpoint.Y, vtpoint.Y); break; } }
public override void SetData(ChartPoint hipoint, ChartPoint lopoint, ChartPoint sopoint, ChartPoint eopoint, ChartPoint scpoint, ChartPoint ecpoint, bool isbull) { this.hipoint = hipoint; this.lowpoint = lopoint; this.sopoint = sopoint; this.eopoint = eopoint; this.scpoint = scpoint; this.ecpoint = ecpoint; this.IsBull = isbull; var alignedValues = AlignHiLoSegment(sopoint.Y, scpoint.Y, hipoint.Y, lopoint.Y); this.hipoint.Y = alignedValues[0]; this.lowpoint.Y = alignedValues[1]; XRange = new DoubleRange(ChartMath.Min(scpoint.X, ecpoint.X, sopoint.X, eopoint.X), ChartMath.Max(scpoint.X, ecpoint.X, sopoint.X, eopoint.X)); YRange = new DoubleRange(lopoint.Y, hipoint.Y); }