示例#1
0
        /// <summary>
        /// Converts Series into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\series");

            int pos = serializer.BeginAttributes();

            if (!_name.IsNull)
            {
                serializer.WriteSimpleAttribute("Name", Name);
            }

            if (!_markerSize.IsNull)
            {
                serializer.WriteSimpleAttribute("MarkerSize", MarkerSize);
            }
            if (!_markerStyle.IsNull)
            {
                serializer.WriteSimpleAttribute("MarkerStyle", MarkerStyle);
            }

            if (!_markerBackgroundColor.IsNull)
            {
                serializer.WriteSimpleAttribute("MarkerBackgroundColor", MarkerBackgroundColor);
            }
            if (!_markerForegroundColor.IsNull)
            {
                serializer.WriteSimpleAttribute("MarkerForegroundColor", MarkerForegroundColor);
            }

            if (!_chartType.IsNull)
            {
                serializer.WriteSimpleAttribute("ChartType", ChartType);
            }

            if (!_hasDataLabel.IsNull)
            {
                serializer.WriteSimpleAttribute("HasDataLabel", HasDataLabel);
            }

            if (!IsNull("LineFormat"))
            {
                _lineFormat.Serialize(serializer);
            }
            if (!IsNull("FillFormat"))
            {
                _fillFormat.Serialize(serializer);
            }
            if (!IsNull("DataLabel"))
            {
                _dataLabel.Serialize(serializer);
            }

            serializer.EndAttributes(pos);

            serializer.BeginContent();
            _seriesElements.Serialize(serializer);
            serializer.WriteLine("");
            serializer.EndContent();
        }
示例#2
0
        /// <summary>
        /// Converts Chart into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\chart(" + Type + ")");
            int pos = serializer.BeginAttributes();

            base.Serialize(serializer);
            if (!_displayBlanksAs.IsNull)
                serializer.WriteSimpleAttribute("DisplayBlanksAs", DisplayBlanksAs);
            if (!_pivotChart.IsNull)
                serializer.WriteSimpleAttribute("PivotChart", PivotChart);
            if (!_hasDataLabel.IsNull)
                serializer.WriteSimpleAttribute("HasDataLabel", HasDataLabel);

            if (!_style.IsNull)
                serializer.WriteSimpleAttribute("Style", Style);
            if (!IsNull("Format"))
                _format.Serialize(serializer, "Format", null);
            if (!IsNull("DataLabel"))
                _dataLabel.Serialize(serializer);
            serializer.EndAttributes(pos);

            serializer.BeginContent();

            if (!IsNull("PlotArea"))
                _plotArea.Serialize(serializer);
            if (!IsNull("HeaderArea"))
                _headerArea.Serialize(serializer);
            if (!IsNull("FooterArea"))
                _footerArea.Serialize(serializer);
            if (!IsNull("TopArea"))
                _topArea.Serialize(serializer);
            if (!IsNull("BottomArea"))
                _bottomArea.Serialize(serializer);
            if (!IsNull("LeftArea"))
                _leftArea.Serialize(serializer);
            if (!IsNull("RightArea"))
                _rightArea.Serialize(serializer);

            if (!IsNull("XAxis"))
                _xAxis.Serialize(serializer);
            if (!IsNull("YAxis"))
                _yAxis.Serialize(serializer);
            if (!IsNull("ZAxis"))
                _zAxis.Serialize(serializer);

            if (!IsNull("SeriesCollection"))
                _seriesCollection.Serialize(serializer);
            if (!IsNull("XValues"))
                _xValues.Serialize(serializer);

            serializer.EndContent();
        }