internal C.SurfaceChartSeries ToSurfaceChartSeries(bool IsStylish = false) { var scs = new C.SurfaceChartSeries(); 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); } scs.Append(AxisData.ToCategoryAxisData()); scs.Append(NumberData.ToValues()); return(scs); }
internal C.PieChartSeries ToPieChartSeries(bool IsStylish = false) { var pcs = new C.PieChartSeries(); pcs.Index = new C.Index { Val = Index }; pcs.Order = new C.Order { Val = Order }; if (IsStringReference != null) { pcs.SeriesText = new C.SeriesText(); if (IsStringReference.Value) { pcs.SeriesText.StringReference = StringReference.ToStringReference(); } else { pcs.SeriesText.NumericValue = new C.NumericValue(NumericValue); } } if (Options.ShapeProperties.HasShapeProperties) { pcs.ChartShapeProperties = Options.ShapeProperties.ToChartShapeProperties(IsStylish); } if (Options.iExplosion != null) { pcs.Explosion = new C.Explosion { Val = Options.Explosion } } ; if (DataPointOptionsList.Count > 0) { var indexlist = DataPointOptionsList.Keys.ToList(); indexlist.Sort(); int index; for (var i = 0; i < indexlist.Count; ++i) { index = indexlist[i]; pcs.Append(DataPointOptionsList[index].ToDataPoint(index, IsStylish)); } } if ((GroupDataLabelOptions != null) || (DataLabelOptionsList.Count > 0)) { if (GroupDataLabelOptions == null) { var gdloptions = new SLGroupDataLabelOptions(new List <Color>()); pcs.Append(gdloptions.ToDataLabels(DataLabelOptionsList, true)); } else { pcs.Append(GroupDataLabelOptions.ToDataLabels(DataLabelOptionsList, false)); } } pcs.Append(AxisData.ToCategoryAxisData()); pcs.Append(NumberData.ToValues()); return(pcs); }
internal C.BarChartSeries ToBarChartSeries(bool IsStylish = false) { var bcs = new C.BarChartSeries(); 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 }; //PictureOptions 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.ToCategoryAxisData()); bcs.Append(NumberData.ToValues()); if (Options.vShape != null) { bcs.Append(new C.Shape { Val = Options.vShape.Value }); } return(bcs); }