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); }
internal C.ScatterChartSeries ToScatterChartSeries(bool IsStylish = false) { var scs = new C.ScatterChartSeries(); scs.Index = new C.Index { Val = Index }; scs.Order = new C.Order { Val = Order }; if (IsStringReference != null) { scs.SeriesText = new C.SeriesText(); if (IsStringReference.Value) { scs.SeriesText.StringReference = StringReference.ToStringReference(); } else { scs.SeriesText.NumericValue = new C.NumericValue(NumericValue); } } if (Options.ShapeProperties.HasShapeProperties) { scs.ChartShapeProperties = Options.ShapeProperties.ToChartShapeProperties(IsStylish); } if (Options.Marker.HasMarker) { scs.Marker = Options.Marker.ToMarker(IsStylish); } if (DataPointOptionsList.Count > 0) { var indexlist = DataPointOptionsList.Keys.ToList(); indexlist.Sort(); int index; for (var i = 0; i < indexlist.Count; ++i) { index = indexlist[i]; scs.Append(DataPointOptionsList[index].ToDataPoint(index, IsStylish)); } } if ((GroupDataLabelOptions != null) || (DataLabelOptionsList.Count > 0)) { if (GroupDataLabelOptions == null) { var gdloptions = new SLGroupDataLabelOptions(new List <Color>()); scs.Append(gdloptions.ToDataLabels(DataLabelOptionsList, true)); } else { scs.Append(GroupDataLabelOptions.ToDataLabels(DataLabelOptionsList, false)); } } scs.Append(AxisData.ToXValues()); scs.Append(NumberData.ToYValues()); scs.Append(new C.Smooth { Val = Options.Smooth }); return(scs); }