private void AddSeries(int index, ILineSeries series) { AbstractLineSeriesCanvas canvas = CreateCanvas(series); canvas.Width = ActualWidth; canvas.Height = ActualHeight; _seriesCanvasses.Insert(index, canvas); }
/// <summary> /// Initializes this canvas. /// </summary> /// <param name="lineSeries"></param> protected AbstractLineSeriesCanvas(ILineSeries lineSeries) { _lineSeries = lineSeries; _lineSeries.PropertyChanged += LineSeriesOnPropertyChanged; OnValuesChanged(_lineSeries.Values); MakeDirty(); }
private void RemoveSeries(ILineSeries series) { AbstractLineSeriesCanvas canvas = _seriesCanvasses.FirstOrDefault(x => x.Series == series); if (canvas != null) { _seriesCanvasses.Remove(canvas); } }
/// <summary> /// Creates a canvas responsible for drawing the given series only. /// </summary> /// <param name="series"></param> /// <returns></returns> protected abstract AbstractLineSeriesCanvas CreateCanvas(ILineSeries series);
/// <summary> /// Creates a canvas responsible for drawing the given series only. /// </summary> /// <param name="series"></param> /// <returns></returns> protected override AbstractLineSeriesCanvas CreateCanvas(ILineSeries series) { return(new StackedLineSeriesCanvas(series)); }
/// <summary> /// Initializes this canvas. /// </summary> /// <param name="lineSeries"></param> public StackedLineSeriesCanvas(ILineSeries lineSeries) : base(lineSeries) { _geometry = new StreamGeometry(); _stackedValues = new Point[0]; }
public ChartLineSeriesSerializerBase(ILineSeries series) : base(series) { this.series = series; }
/// <summary> /// Initializes this canvas. /// </summary> /// <param name="lineSeries"></param> public LineSeriesCanvas(ILineSeries lineSeries) : base(lineSeries) { _area = new StreamGeometry(); _outline = new StreamGeometry(); }