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 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) { 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; } } ScatterSymbolGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(IScatterSymbol c) { Shape = 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; }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed3DPlotData pdata) { if (IsColorProvider) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(Color); }); } ScatterSymbolGroupStyle.PrepareStyle(externalGroups, localGroups, delegate { return(_symbolShape); }); 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 if (!_independentSkipFreq) { SkipFrequencyGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(SkipFrequency); }); } }
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)); }