Exemplo n.º 1
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);
        }
Exemplo n.º 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;
        }
        internal C.BubbleChartSeries ToBubbleChartSeries(bool IsStylish = false)
        {
            var bcs = new C.BubbleChartSeries();

            bcs.Index = new C.Index {
                Val = Index
            };
            bcs.Order = new C.Order {
                Val = Order
            };

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

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

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

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

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

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

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

            return(bcs);
        }