public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { if (this.IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(PlotColors.Colors.GetPlotColor(this.Color)); }); } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { if (this.IsColorReceiver) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(PlotColor c) { this.Color = c; }); } }
public void ApplyGroupStyles(Altaxo.Graph.Gdi.Plot.Groups.PlotGroupStyleCollection externalGroups, Altaxo.Graph.Gdi.Plot.Groups.PlotGroupStyleCollection localGroups) { // color if (!_independentColor) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(PlotColor c) { this._strokePen.Color = c; }); } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { this.SkipFrequency = c; }); // symbol size if (!_independentSymbolSize) { if (!SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(float size) { this._symbolSize = size; })) { this._symbolSize = 0; } } // bar position BarWidthPositionGroupStyle bwp = PlotGroupStyle.GetStyleToApply <BarWidthPositionGroupStyle>(externalGroups, localGroups); if (null != bwp && !_doNotShiftHorizontalPosition) { double innerGapW, outerGapW, width, lpos; bwp.Apply(out innerGapW, out outerGapW, out width, out lpos); _cachedLogicalShiftOfIndependent = lpos + width / 2; } else { _cachedLogicalShiftOfIndependent = 0; } }
public void CollectLocalGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { if (this.IsColorProvider) { ColorGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); } }
public void CollectLocalGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { ColorGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); DashPatternGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); IgnoreMissingDataPointsGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); LineConnection2DGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); }
public void CollectLocalGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { ColorGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); SymbolSizeGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); ScatterSymbolGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); SkipFrequencyGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); // (local group style only) }
public void CollectLocalGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { ColorGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); SymbolSizeGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); ScatterSymbolGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); // here it is OK to add the local group style, even if _independentScatterSymbol is true SkipFrequencyGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); // (local group style only) IgnoreMissingDataPointsGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { // IgnoreMissingDataPoints is the same for all sub plot styles IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => _ignoreMissingDataPoints = ignoreMissingDataPoints); if (IsColorReceiver) { // try to get a constant color ... ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { Color = c; }); // but if there is a color evaluation function, then use that function with higher priority if (!VariableColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, Color> evalFunc) { _cachedColorForIndexFunction = evalFunc; })) { _cachedColorForIndexFunction = null; } } if (!_independentScatterSymbol) { ScatterSymbolGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(IScatterSymbol c) { ScatterSymbol = c; }); } // per Default, set the symbol size evaluation function to null _cachedSymbolSizeForIndexFunction = null; if (!_independentSymbolSize) { // try to get a constant symbol size ... SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { SymbolSize = size; }); // but if there is an symbol size evaluation function, then use this with higher priority. if (!VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, double> evalFunc) { _cachedSymbolSizeForIndexFunction = evalFunc; })) { _cachedSymbolSizeForIndexFunction = null; } } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property if (!_independentSkipFreq) { SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { SkipFrequency = c; }); } // Shift the items ? _cachedLogicalShiftX = 0; _cachedLogicalShiftY = 0; if (!_independentOnShiftingGroupStyles) { var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface <IShiftLogicalXYGroupStyle>(externalGroups, localGroups); if (null != shiftStyle) { shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY); } } }
public void CollectExternalGroupStyles(PlotGroupStyleCollection externalGroups) { if (IsColorProvider) { ColorGroupStyle.AddExternalGroupStyle(externalGroups); } ScatterSymbolGroupStyle.AddExternalGroupStyle(externalGroups); }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { // IgnoreMissingDataPoints is the same for all sub plot styles IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => _ignoreMissingDataPoints = ignoreMissingDataPoints); // LineConnectionStyle is the same for all sub plot styles LineConnection2DGroupStyle.ApplyStyle(externalGroups, localGroups, (lineConnection, connectCircular) => { _connectionStyle = lineConnection; _connectCircular = connectCircular; }); if (ColorLinkage.Independent != _fillColorLinkage) { if (null == _fillBrush) { _fillBrush = new BrushX(NamedColors.Black); } if (_fillColorLinkage == ColorLinkage.Dependent) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _fillBrush.Color = c; }); } else if (ColorLinkage.PreserveAlpha == _fillColorLinkage) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _fillBrush.Color = c.NewWithAlphaValue(_fillBrush.Color.Color.A); }); } } if (ColorLinkage.Independent != _frameColorLinkage) { if (null == _framePen) { ChildSetMember(ref _framePen, new PenX(NamedColors.Black)); } if (_frameColorLinkage == ColorLinkage.Dependent) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _framePen.Color = c; }); } else if (ColorLinkage.PreserveAlpha == _fillColorLinkage) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _framePen.Color = c.NewWithAlphaValue(_framePen.Color.Color.A); }); } } // Shift the items ? _cachedLogicalShiftX = 0; _cachedLogicalShiftY = 0; if (!_independentOnShiftingGroupStyles) { var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface <IShiftLogicalXYGroupStyle>(externalGroups, localGroups); if (null != shiftStyle) { shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY); } } }
public void CollectLocalGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { ColorGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); if (!_independentSkipFrequency) { SkipFrequencyGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); // (local group style only) } IgnoreMissingDataPointsGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { // IgnoreMissingDataPoints is the same for all sub plot styles IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => _ignoreMissingDataPoints = ignoreMissingDataPoints); _cachedColorForIndexFunction = null; _cachedSymbolSizeForIndexFunction = null; // color if (!_independentColor) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _strokePen.Color = c; }); // but if there is a color evaluation function, then use that function with higher priority VariableColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, System.Drawing.Color> evalFunc) { _cachedColorForIndexFunction = evalFunc; }); } if (!_independentSkipFrequency) { SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { SkipFrequency = c; }); } // symbol size if (!_independentSymbolSize) { _symbolSize = 0; SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { _symbolSize = size; }); // but if there is an symbol size evaluation function, then use this with higher priority. _cachedSymbolSizeForIndexFunction = null; VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, double> evalFunc) { _cachedSymbolSizeForIndexFunction = evalFunc; }); } else { _cachedSymbolSizeForIndexFunction = null; } // Shift the items ? _cachedLogicalShiftX = 0; _cachedLogicalShiftY = 0; if (!_independentOnShiftingGroupStyles) { var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface <IShiftLogicalXYGroupStyle>(externalGroups, localGroups); if (null != shiftStyle) { shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY); } } }
public void CollectExternalGroupStyles(PlotGroupStyleCollection externalGroups) { if (this.IsColorProvider) { ColorGroupStyle.AddExternalGroupStyle(externalGroups); } if (this.IsSymbolSizeProvider) { SymbolSizeGroupStyle.AddExternalGroupStyle(externalGroups); } SymbolShapeStyleGroupStyle.AddExternalGroupStyle(externalGroups); }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed3DPlotData pdata) { // first, we have to calculate the span of logical values from the minimum logical value to the maximum logical value int numberOfItems = 0; if (null != pdata) { double minLogicalX = double.MaxValue; double maxLogicalX = double.MinValue; double minLogicalY = double.MaxValue; double maxLogicalY = double.MinValue; foreach (int originalRowIndex in pdata.RangeList.OriginalRowIndices()) { numberOfItems++; double logicalX = layer.XAxis.PhysicalVariantToNormal(pdata.GetXPhysical(originalRowIndex)); if (logicalX < minLogicalX) { minLogicalX = logicalX; } if (logicalX > maxLogicalX) { maxLogicalX = logicalX; } double logicalY = layer.YAxis.PhysicalVariantToNormal(pdata.GetXPhysical(originalRowIndex)); if (logicalY < minLogicalY) { minLogicalY = logicalY; } if (logicalY > maxLogicalY) { maxLogicalY = logicalY; } } BarSizePosition3DGroupStyle.IntendToApply(externalGroups, localGroups, numberOfItems, minLogicalX, maxLogicalX, minLogicalY, maxLogicalY); } BarSizePosition3DGroupStyle bwp = PlotGroupStyle.GetStyleToInitialize <BarSizePosition3DGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Initialize(_barShiftStrategy, _barShiftMaxNumberOfItemsInOneDirection, _relInnerGapX, _relOuterGapX, _relInnerGapY, _relOuterGapY); } if (!_independentColor) // else if is used here because fill color has precedence over frame color { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(_pen.Color); }); } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { BarWidthPositionGroupStyle bwp = PlotGroupStyle.GetStyleToApply <BarWidthPositionGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Apply(out _relInnerGapWidth, out _relOuterGapWidth, out _width, out _position); } if (this.IsColorReceiver) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(PlotColor c) { this._fillBrush.Color = c; }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed3DPlotData pdata) { if (IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(Color); }); } if (!_independentDashStyle) { DashPatternGroupStyle.PrepareStyle(externalGroups, localGroups, delegate { return(LinePen.DashPattern ?? DashPatternListManager.Instance.BuiltinDefaultSolid); }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed3DPlotData pdata) { if (IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(Color); }); } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property if (!_independentSkipFreq) { SkipFrequencyGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(_skipFreq); }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { if (_fillColorLinkage == ColorLinkage.Dependent && _fillBrush != null) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(_fillBrush.Color); }); } else if (_frameColorLinkage == ColorLinkage.Dependent && _framePen != null) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(_framePen.Color); }); } IgnoreMissingDataPointsGroupStyle.PrepareStyle(externalGroups, localGroups, () => _ignoreMissingDataPoints); LineConnection2DGroupStyle.PrepareStyle(externalGroups, localGroups, () => new Tuple <ILineConnectionStyle, bool>(_connectionStyle, _connectCircular)); }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { if (IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(Color); }); } if (!_independentDashStyle) { DashPatternGroupStyle.PrepareStyle(externalGroups, localGroups, delegate { return(LinePen.DashPattern); }); } IgnoreMissingDataPointsGroupStyle.PrepareStyle(externalGroups, localGroups, () => _ignoreMissingDataPoints); LineConnection2DGroupStyle.PrepareStyle(externalGroups, localGroups, () => new Tuple <ILineConnectionStyle, bool>(_connectionStyle, _connectCircular)); }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { if (this.IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(PlotColors.Colors.GetPlotColor(this.Color)); }); } SymbolShapeStyleGroupStyle.PrepareStyle(externalGroups, localGroups, delegate { return(this.ShapeAndStyle); }); if (this.IsSymbolSizeProvider) { SymbolSizeGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(SymbolSize); }); } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property SkipFrequencyGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(SkipFrequency); }); }
public void CollectExternalGroupStyles(PlotGroupStyleCollection externalGroups) { if (IsColorProvider) { ColorGroupStyle.AddExternalGroupStyle(externalGroups); } if (IsSymbolSizeProvider) { SymbolSizeGroupStyle.AddExternalGroupStyle(externalGroups); } if (!_independentScatterSymbol) { ScatterSymbolGroupStyle.AddExternalGroupStyle(externalGroups); } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { // SkipFrequency should be the same for all sub plot styles if (!_independentSkipFreq) { _skipFreq = 1; SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { _skipFreq = c; }); } if (IsColorReceiver) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { Color = c; }); } if (!_independentDashStyle) { DashPatternGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(IDashPattern c) { _linePen = LinePen.WithDashPattern(c); }); } if (!_independentSymbolSize) { _symbolSize = 0; SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { _symbolSize = size; }); } // symbol size if (!_independentSymbolSize) { _symbolSize = 0; SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { _symbolSize = size; }); // but if there is an symbol size evaluation function, then use this with higher priority. _cachedSymbolSizeForIndexFunction = null; VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, double> evalFunc) { _cachedSymbolSizeForIndexFunction = evalFunc; }); } else { _cachedSymbolSizeForIndexFunction = null; } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { if (this.IsColorReceiver) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(PlotColor c) { this.Color = c; }); } SymbolShapeStyleGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(ShapeAndStyle c) { this.ShapeAndStyle = c; }); if (!_independentSymbolSize) { SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(float size) { this.SymbolSize = size; }); } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { this.SkipFrequency = c; }); }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { if (IsColorReceiver) { // try to get a constant color ... ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { Color = c; }); // but if there is a color evaluation function, then use that function with higher priority if (!VariableColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, Color> evalFunc) { _cachedColorForIndexFunction = evalFunc; })) { _cachedColorForIndexFunction = null; } } // try to get the symbol size ... if (!_independentSymbolSize) { _cachedSymbolSize = 0; SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { _cachedSymbolSize = size; }); // but if there is an symbol size evaluation function, then use this with higher priority. if (!VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, double> evalFunc) { _cachedSymbolSizeForIndexFunction = evalFunc; })) { _cachedSymbolSizeForIndexFunction = null; } } else { _cachedSymbolSize = _symbolSize; } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property if (!_independentSkipFreq) { _skipFreq = 1; SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { _skipFreq = c; }); } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { _cachedColorForIndexFunction = null; BarSizePosition2DGroupStyle bwp = PlotGroupStyle.GetStyleToApply <BarSizePosition2DGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Apply(out _relInnerGapX, out _relOuterGapX, out _xSizeLogical, out _xOffsetLogical); } if (!_independentFillColor) { if (null == _fillBrush) { _fillBrush = new BrushX(Drawing.ColorManagement.ColorSetManager.Instance.BuiltinDarkPlotColors[0]); } ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _fillBrush.Color = c; }); // but if there is a color evaluation function, then use that function with higher priority VariableColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, Color> evalFunc) { _cachedColorForIndexFunction = evalFunc; }); } if (!_independentFrameColor) { if (null == _framePen) { _framePen = new PenX(Drawing.ColorManagement.ColorSetManager.Instance.BuiltinDarkPlotColors[0]); } ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _framePen.Color = c; }); // but if there is a color evaluation function, then use that function with higher priority VariableColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, Color> evalFunc) { _cachedColorForIndexFunction = evalFunc; }); } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { _cachedColorForIndexFunction = null; BarSizePosition3DGroupStyle bwp = PlotGroupStyle.GetStyleToApply <BarSizePosition3DGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Apply( out _barShiftStrategy, out _barShiftMaxNumberOfItemsInOneDirection, out _relInnerGapX, out _relOuterGapX, out _xSizeLogical, out _xOffsetLogical, out _relInnerGapY, out _relOuterGapY, out _ySizeLogical, out _yOffsetLogical); } if (!_independentColor) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { _pen = _pen.WithColor(c); }); // but if there is a color evaluation function, then use that function with higher priority VariableColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, System.Drawing.Color> evalFunc) { _cachedColorForIndexFunction = evalFunc; }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { // first, we have to calculate the span of logical values from the minimum logical value to the maximum logical value int numberOfItems = 0; double minLogical = double.MaxValue; double maxLogical = double.MinValue; foreach (int originalRowIndex in pdata.RangeList.OriginalRowIndices()) { double logicalX = layer.XAxis.PhysicalVariantToNormal(pdata.GetXPhysical(originalRowIndex)); numberOfItems++; if (logicalX < minLogical) { minLogical = logicalX; } if (logicalX > maxLogical) { maxLogical = logicalX; } } BarWidthPositionGroupStyle.IntendToApply(externalGroups, localGroups, numberOfItems, minLogical, maxLogical); BarWidthPositionGroupStyle bwp = PlotGroupStyle.GetStyleToInitialize <BarWidthPositionGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Initialize(_relInnerGapWidth, _relOuterGapWidth); } if (this.IsColorReceiver) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(PlotColors.Colors.GetPlotColor(this._fillBrush.Color)); }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { if (IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(Color); }); } ScatterSymbolGroupStyle.PrepareStyle(externalGroups, localGroups, delegate { return(_scatterSymbol); }); if (IsSymbolSizeProvider) { SymbolSizeGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(SymbolSize); }); } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property SkipFrequencyGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(SkipFrequency); }); // IgnoreMissingDataPoints should be the same for all sub plot styles, so there is no "private" property IgnoreMissingDataPointsGroupStyle.PrepareStyle(externalGroups, localGroups, () => _ignoreMissingDataPoints); }
public override bool Apply(bool disposeController) { bool color = _view.PlotGroupColor; bool linestyle = _view.PlotGroupLineType; bool symbol = _view.PlotGroupSymbol; bool serial = !_view.PlotGroupConcurrently; ColorGroupStyle newColorGroupStyle = null; DashPatternGroupStyle newLineStyleGroupStyle = null; ScatterSymbolGroupStyle newScatterSymbolGroupStyle = null; if (_doc.ContainsType(typeof(ColorGroupStyle))) { newColorGroupStyle = (ColorGroupStyle)_doc.GetPlotGroupStyle(typeof(ColorGroupStyle)).Clone(); _doc.RemoveType(typeof(ColorGroupStyle)); } if (_doc.ContainsType(typeof(DashPatternGroupStyle))) { newLineStyleGroupStyle = (DashPatternGroupStyle)_doc.GetPlotGroupStyle(typeof(DashPatternGroupStyle)).Clone(); _doc.RemoveType(typeof(DashPatternGroupStyle)); } if (_doc.ContainsType(typeof(ScatterSymbolGroupStyle))) { newScatterSymbolGroupStyle = (ScatterSymbolGroupStyle)_doc.GetPlotGroupStyle(typeof(ScatterSymbolGroupStyle)).Clone(); _doc.RemoveType(typeof(ScatterSymbolGroupStyle)); } if (color) { newColorGroupStyle = newColorGroupStyle ?? ColorGroupStyle.NewExternalGroupStyle(); newColorGroupStyle.IsStepEnabled = true; _doc.Add(newColorGroupStyle); } if (linestyle) { newLineStyleGroupStyle = newLineStyleGroupStyle ?? new DashPatternGroupStyle(); newLineStyleGroupStyle.IsStepEnabled = true; if (serial && color) { _doc.Add(newLineStyleGroupStyle, typeof(ColorGroupStyle)); } else { _doc.Add(newLineStyleGroupStyle); } } if (symbol) { newScatterSymbolGroupStyle = newScatterSymbolGroupStyle ?? new ScatterSymbolGroupStyle(); newScatterSymbolGroupStyle.IsStepEnabled = true; if (serial && linestyle) { _doc.Add(newScatterSymbolGroupStyle, typeof(DashPatternGroupStyle)); } else if (serial && color) { _doc.Add(newScatterSymbolGroupStyle, typeof(ColorGroupStyle)); } else { _doc.Add(newScatterSymbolGroupStyle); } } _doc.PlotGroupStrictness = _view.PlotGroupStrict; return(ApplyEnd(true, disposeController)); }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { // IgnoreMissingDataPoints is the same for all sub plot styles IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => _ignoreMissingDataPoints = ignoreMissingDataPoints); // LineConnectionStyle is the same for all sub plot styles LineConnection2DGroupStyle.ApplyStyle(externalGroups, localGroups, (lineConnection, connectCircular) => { _connectionStyle = lineConnection; _connectCircular = connectCircular; }); // SkipFrequency should be the same for all sub plot styles if (!_independentSkipFrequency) { _skipFrequency = 1; SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { _skipFrequency = c; }); } if (IsColorReceiver) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c) { Color = c; }); } if (!_independentDashStyle) { DashPatternGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(IDashPattern c) { _linePen.DashPattern = c; }); } if (!_independentSymbolSize) { _symbolSize = 0; SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { _symbolSize = size; }); } // symbol size if (!_independentSymbolSize) { _symbolSize = 0; SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size) { _symbolSize = size; }); // but if there is an symbol size evaluation function, then use this with higher priority. _cachedSymbolSizeForIndexFunction = null; VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, double> evalFunc) { _cachedSymbolSizeForIndexFunction = evalFunc; }); } else { _cachedSymbolSizeForIndexFunction = null; } // Shift the items ? _cachedLogicalShiftX = 0; _cachedLogicalShiftY = 0; if (!_independentOnShiftingGroupStyles) { var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface <IShiftLogicalXYGroupStyle>(externalGroups, localGroups); if (null != shiftStyle) { shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY); } } }