Esempio n. 1
0
        internal C.RadarChartSeries ToRadarChartSeries(bool IsStylish = false)
        {
            C.RadarChartSeries rcs = new C.RadarChartSeries();
            rcs.Index = new C.Index()
            {
                Val = this.Index
            };
            rcs.Order = new C.Order()
            {
                Val = this.Order
            };

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

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

            if (this.Options.Marker.HasMarker)
            {
                rcs.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];
                    rcs.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>());
                    rcs.Append(gdloptions.ToDataLabels(this.DataLabelOptionsList, true));
                }
                else
                {
                    rcs.Append(this.GroupDataLabelOptions.ToDataLabels(this.DataLabelOptionsList, false));
                }
            }

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

            return(rcs);
        }
Esempio n. 2
0
        internal C.RadarChartSeries ToRadarChartSeries(bool IsStylish = false)
        {
            C.RadarChartSeries rcs = new C.RadarChartSeries();
            rcs.Index = new C.Index() { Val = this.Index };
            rcs.Order = new C.Order() { Val = this.Order };

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

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

            if (this.Options.Marker.HasMarker)
            {
                rcs.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];
                    rcs.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>());
                    rcs.Append(gdloptions.ToDataLabels(this.DataLabelOptionsList, true));
                }
                else
                {
                    rcs.Append(this.GroupDataLabelOptions.ToDataLabels(this.DataLabelOptionsList, false));
                }
            }

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

            return rcs;
        }
        internal C.RadarChartSeries ToRadarChartSeries(bool IsStylish = false)
        {
            var rcs = new C.RadarChartSeries();

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

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

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

            if (Options.Marker.HasMarker)
            {
                rcs.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];
                    rcs.Append(DataPointOptionsList[index].ToDataPoint(index, IsStylish));
                }
            }

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

            rcs.Append(AxisData.ToCategoryAxisData());
            rcs.Append(NumberData.ToValues());

            return(rcs);
        }