コード例 #1
0
        internal SLGroupDataLabelOptions Clone()
        {
            SLGroupDataLabelOptions gdlo = new SLGroupDataLabelOptions(this.ShapeProperties.listThemeColors);

            gdlo.Rotation           = this.Rotation;
            gdlo.Vertical           = this.Vertical;
            gdlo.Anchor             = this.Anchor;
            gdlo.AnchorCenter       = this.AnchorCenter;
            gdlo.HasNumberingFormat = this.HasNumberingFormat;
            gdlo.sFormatCode        = this.sFormatCode;
            gdlo.bSourceLinked      = this.bSourceLinked;
            gdlo.vLabelPosition     = this.vLabelPosition;
            gdlo.ShapeProperties    = this.ShapeProperties.Clone();
            gdlo.ShowLegendKey      = this.ShowLegendKey;
            gdlo.ShowValue          = this.ShowValue;
            gdlo.ShowCategoryName   = this.ShowCategoryName;
            gdlo.ShowSeriesName     = this.ShowSeriesName;
            gdlo.ShowPercentage     = this.ShowPercentage;
            gdlo.ShowBubbleSize     = this.ShowBubbleSize;
            gdlo.Separator          = this.Separator;
            gdlo.ShowLeaderLines    = this.ShowLeaderLines;

            return(gdlo);
        }
コード例 #2
0
        internal C.BubbleChartSeries ToBubbleChartSeries(bool IsStylish = false)
        {
            C.BubbleChartSeries bcs = new C.BubbleChartSeries();
            bcs.Index = new C.Index()
            {
                Val = this.Index
            };
            bcs.Order = new C.Order()
            {
                Val = this.Order
            };

            if (this.IsStringReference != null)
            {
                bcs.SeriesText = new C.SeriesText();
                if (this.IsStringReference.Value)
                {
                    bcs.SeriesText.StringReference = this.StringReference.ToStringReference();
                }
                else
                {
                    bcs.SeriesText.NumericValue = new C.NumericValue(this.NumericValue);
                }
            }

            if (this.Options.ShapeProperties.HasShapeProperties)
            {
                bcs.ChartShapeProperties = this.Options.ShapeProperties.ToChartShapeProperties(IsStylish);
            }

            bcs.InvertIfNegative = new C.InvertIfNegative()
            {
                Val = this.Options.InvertIfNegative ?? false
            };

            if (this.DataPointOptionsList.Count > 0)
            {
                List <int> indexlist = this.DataPointOptionsList.Keys.ToList <int>();
                indexlist.Sort();
                int index;
                for (int i = 0; i < indexlist.Count; ++i)
                {
                    index = indexlist[i];
                    bcs.Append(this.DataPointOptionsList[index].ToDataPoint(index, IsStylish));
                }
            }

            if (this.GroupDataLabelOptions != null || this.DataLabelOptionsList.Count > 0)
            {
                if (this.GroupDataLabelOptions == null)
                {
                    SLGroupDataLabelOptions gdloptions = new SLGroupDataLabelOptions(new List <System.Drawing.Color>());
                    bcs.Append(gdloptions.ToDataLabels(this.DataLabelOptionsList, true));
                }
                else
                {
                    bcs.Append(this.GroupDataLabelOptions.ToDataLabels(this.DataLabelOptionsList, false));
                }
            }

            bcs.Append(this.AxisData.ToXValues());
            bcs.Append(this.NumberData.ToYValues());
            bcs.Append(this.BubbleSize.ToBubbleSize());

            if (this.Options.bBubble3D != null)
            {
                bcs.Append(new C.Bubble3D()
                {
                    Val = this.Options.Bubble3D
                });
            }

            return(bcs);
        }
コード例 #3
0
        internal C.LineChartSeries ToLineChartSeries(bool IsStylish = false)
        {
            C.LineChartSeries lcs = new C.LineChartSeries();
            lcs.Index = new C.Index()
            {
                Val = this.Index
            };
            lcs.Order = new C.Order()
            {
                Val = this.Order
            };

            if (this.IsStringReference != null)
            {
                lcs.SeriesText = new C.SeriesText();
                if (this.IsStringReference.Value)
                {
                    lcs.SeriesText.StringReference = this.StringReference.ToStringReference();
                }
                else
                {
                    lcs.SeriesText.NumericValue = new C.NumericValue(this.NumericValue);
                }
            }

            if (this.Options.ShapeProperties.HasShapeProperties)
            {
                lcs.ChartShapeProperties = this.Options.ShapeProperties.ToChartShapeProperties(IsStylish);
            }

            if (this.Options.Marker.HasMarker)
            {
                lcs.Marker = this.Options.Marker.ToMarker(IsStylish);
            }

            if (this.DataPointOptionsList.Count > 0)
            {
                List <int> indexlist = this.DataPointOptionsList.Keys.ToList <int>();
                indexlist.Sort();
                int index;
                for (int i = 0; i < indexlist.Count; ++i)
                {
                    index = indexlist[i];
                    lcs.Append(this.DataPointOptionsList[index].ToDataPoint(index, IsStylish));
                }
            }

            if (this.GroupDataLabelOptions != null || this.DataLabelOptionsList.Count > 0)
            {
                if (this.GroupDataLabelOptions == null)
                {
                    SLGroupDataLabelOptions gdloptions = new SLGroupDataLabelOptions(new List <System.Drawing.Color>());
                    lcs.Append(gdloptions.ToDataLabels(this.DataLabelOptionsList, true));
                }
                else
                {
                    lcs.Append(this.GroupDataLabelOptions.ToDataLabels(this.DataLabelOptionsList, false));
                }
            }

            lcs.Append(this.AxisData.ToCategoryAxisData());
            lcs.Append(this.NumberData.ToValues());

            lcs.Append(new C.Smooth()
            {
                Val = this.Options.Smooth
            });

            return(lcs);
        }