Esempio n. 1
0
        /// <summary>
        /// 속성들을 Xml Attribute로 생성합니다.
        /// </summary>
        /// <param name="writer">Attribute를 쓸 Writer</param>
        public override void GenerateXmlAttributes(System.Xml.XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            if (PaletteColors.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("paletteColors", PaletteColors);
            }
            if (ShowPlotBorder.HasValue)
            {
                writer.WriteAttributeString("showPlotBorder", ShowPlotBorder.GetHashCode().ToString());
            }
            if (PlotBorderColor.HasValue)
            {
                writer.WriteAttributeString("plotBorderColor", PlotBorderColor.Value.ToHexString());
            }
            if (PlotBorderThickness.HasValue)
            {
                writer.WriteAttributeString("plotBorderThickness", PlotBorderThickness.ToString());
            }
            if (PlotBorderAlpha.HasValue)
            {
                writer.WriteAttributeString("plotBorderAlpha", PlotBorderAlpha.ToString());
            }
            if (PlotFillAlpha.HasValue)
            {
                writer.WriteAttributeString("plotFillAlpha", PlotFillAlpha.ToString());
            }
            if (PlotFillColor.HasValue)
            {
                writer.WriteAttributeString("plotFillColor", PlotFillColor.Value.ToHexString());
            }
            if (PieRadius.HasValue)
            {
                writer.WriteAttributeString("pieRadius", PieRadius.ToString());
            }

            if (PieFillAlpha.HasValue)
            {
                writer.WriteAttributeString("PieFillAlpha", PieFillAlpha.ToString());
            }
            if (PieBorderThickness.HasValue)
            {
                writer.WriteAttributeString("PieBorderThickness", PieBorderThickness.ToString());
            }
            if (HoverFillColor.HasValue)
            {
                writer.WriteAttributeString("HoverFillColor", HoverFillColor.Value.ToHexString());
            }
            if (PieBorderColor.HasValue)
            {
                writer.WriteAttributeString("PieBorderColor", PieBorderColor.Value.ToHexString());
            }
            if (UseHoverColor.HasValue)
            {
                writer.WriteAttributeString("useHoverColor", UseHoverColor.GetHashCode().ToString());
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 속성 중 Attribute Node로 표현해야 한다.
        /// </summary>
        /// <param name="writer"></param>
        public override void GenerateXmlAttributes(XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            // NOTE: 자동으로 속성을 XmlAttribute로 생성합니다 (개발 중)
            // ChartExtensions.WriteChartAttribute((FusionChartBase)this, writer);

            if (Animation.HasValue)
            {
                writer.WriteAttributeString("Animation", Animation.Value.GetHashCode().ToString());
            }
            if (PaletteColors.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("PaletteColors", PaletteColors);
            }
            if (LabelDisplay.HasValue)
            {
                writer.WriteAttributeString("LabelDisplay", LabelDisplay.Value.ToString());
            }
            if (RotateLabels.HasValue)
            {
                writer.WriteAttributeString("RotateLabels", RotateLabels.GetHashCode().ToString());
            }
            if (SlantLabels.HasValue)
            {
                writer.WriteAttributeString("SlantLabels", SlantLabels.GetHashCode().ToString());
            }
            if (LabelStep.HasValue)
            {
                writer.WriteAttributeString("LabelStep", LabelStep.ToString());
            }
            if (StaggerLines.HasValue)
            {
                writer.WriteAttributeString("StaggerLines", StaggerLines.ToString());
            }

            if (PlaceValuesInside.HasValue)
            {
                writer.WriteAttributeString("PlaceValuesInside", PlaceValuesInside.GetHashCode().ToString());
            }
            if (ShowLimits.HasValue)
            {
                writer.WriteAttributeString("ShowLimits", ShowLimits.GetHashCode().ToString());
            }
            if (ShowDivLineValues.HasValue)
            {
                writer.WriteAttributeString("ShowDivLineValues", ShowDivLineValues.GetHashCode().ToString());
            }
            if (ShowPercentValues.HasValue)
            {
                writer.WriteAttributeString("showPercentValues", ShowPercentValues.GetHashCode().ToString());
            }

            if (AdjustDiv.HasValue)
            {
                writer.WriteAttributeString("AdjustDiv", AdjustDiv.GetHashCode().ToString());
            }

            if (MaxColWidth.HasValue)
            {
                writer.WriteAttributeString("MaxColWidth", MaxColWidth.ToString());
            }
            if (Use3DLighting.HasValue)
            {
                writer.WriteAttributeString("Use3DLighting", Use3DLighting.GetHashCode().ToString());
            }

            if (SetAdaptiveYMin.HasValue)
            {
                writer.WriteAttributeString("SetAdaptiveYMin", SetAdaptiveYMin.GetHashCode().ToString());
            }

            if (Is2D.HasValue)
            {
                writer.WriteAttributeString("is2D", Is2D.GetHashCode().ToString());
            }

            if (ChartOnTop.HasValue)
            {
                writer.WriteAttributeString("chartOnTop", ChartOnTop.GetHashCode().ToString());
            }

            if (XLabelGap.HasValue)
            {
                writer.WriteAttributeString("xLabelGap", XLabelGap.ToString());
            }
            if (YLabelGap.HasValue)
            {
                writer.WriteAttributeString("yLabelGap", YLabelGap.ToString());
            }

            if (NumVisiblePlot.HasValue)
            {
                writer.WriteAttributeString("numVisiblePlot", NumVisiblePlot.ToString());
            }
            if (ScrollToEnd.HasValue)
            {
                writer.WriteAttributeString("scrollToEnd", ScrollToEnd.GetHashCode().ToString());
            }

            if (_anchor != null)
            {
                _anchor.GenerateXmlAttributes(writer);
            }

            if (NumDivLines.HasValue)
            {
                writer.WriteAttributeString("numDivLines", NumDivLines.ToString());
            }

            if (_divLine != null)
            {
                _divLine.GenerateXmlAttributes(writer);
            }

            if (_zeroPlane != null)
            {
                _zeroPlane.GenerateXmlAttributes(writer);
            }

            if (NumVDivLines.HasValue)
            {
                writer.WriteAttributeString("numVDivLines", NumVDivLines.ToString());
            }

            if (_vDivLine != null)
            {
                _vDivLine.GenerateXmlAttributes(writer);
            }

            if (_alternateHGrid != null)
            {
                _alternateHGrid.GenerateXmlAttributes(writer);
            }
            if (_alternateVGrid != null)
            {
                _alternateVGrid.GenerateXmlAttributes(writer);
            }

            if (DivLineEffect.HasValue)
            {
                writer.WriteAttributeString("divLineEffect", DivLineEffect.ToString().ToUpper());
            }

            if (_outCnvBaseFontAttr != null)
            {
                _outCnvBaseFontAttr.GenerateXmlAttributes(writer);
            }

            if (_dataPlotAttr != null)
            {
                _dataPlotAttr.GenerateXmlAttributes(writer);
            }

            if (_xAxisAttr != null)
            {
                _xAxisAttr.GenerateXmlAttributes(writer);
            }
            if (_yAxisAttr != null)
            {
                _yAxisAttr.GenerateXmlAttributes(writer);
            }
        }