Ejemplo n.º 1
0
 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)); });
     }
 }
Ejemplo n.º 2
0
        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); });
            }
        }
Ejemplo n.º 3
0
        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); });
            }
        }
Ejemplo n.º 4
0
        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); });
            }
        }
Ejemplo n.º 5
0
        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));
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
        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); });
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        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)); });
            }
        }