internal override void UpdateUICore(ChartLayoutContext context) { base.UpdateUICore(context); this.signalRenderer.Render(this.drawWithComposition); if (this.drawWithComposition && this.signalRenderer.renderPoints.Count > 2) { foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.signalRenderer.renderPoints)) { this.chart.ContainerVisualsFactory.PrepareLineRenderVisual(this.signalRendererVisual, this.signalRenderer.GetPoints(dataSegment), this.SignalStroke, this.StrokeThickness); } } }
protected override void RenderCore() { // we need at least two points to calculate the line if (this.renderPoints.Count < 2) { return; } PathFigure figure = null; PolyLineSegment lineSegment = null; foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderPoints)) { foreach (Point point in this.GetPoints(dataSegment)) { if (lineSegment == null) { figure = new PathFigure(); figure.StartPoint = point; lineSegment = new PolyLineSegment(); continue; } lineSegment.Points.Add(point); } // NOTE: data segment is defined if it contains at least two points so we are sure that the PolyLineSegment is meaningful (if it exists) if (lineSegment != null) { figure.Segments.Add(lineSegment); this.shapeGeometry.Figures.Add(figure); figure = null; lineSegment = null; } } }
protected override void RenderCore() { // we need at least two points to calculate the line if (this.renderPoints.Count < 2) { return; } AreaRenderContext context = new AreaRenderContext(this); foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderPoints)) { context.CurrentSegment = dataSegment; context.AreaFigure = new PathFigure(); this.AddTopPoints(context); this.AddBottomPoints(context); context.AreaFigure.IsClosed = true; this.areaShapeGeometry.Figures.Add(context.AreaFigure); context.PreviousSegmentEndIndex = dataSegment.EndIndex; } // Fill in top points this.FillEmptyPointsToTopSurface(context, this.renderPoints.Count - 1); if (!this.renderPoints[this.renderPoints.Count - 1].isEmpty) { this.AddRightStrokeLine(context); } if (!this.renderPoints[0].isEmpty) { this.AddLeftStrokeLine(context); } }