Exemplo 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());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 속성들을 Xml Attribute로 생성합니다.
        /// </summary>
        /// <param name="writer">Attribute를 쓸 Writer</param>
        public override void GenerateXmlAttributes(XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            if (PlotAsDot.HasValue)
            {
                writer.WriteAttributeString("PlotAsDot", PlotAsDot.GetHashCode().ToString());
            }
            if (PlotFillPercent.HasValue)
            {
                writer.WriteAttributeString("PlotFillPercent", PlotFillPercent.ToString());
            }
            if (TargetFillPercent.HasValue)
            {
                writer.WriteAttributeString("TargetFillPercent", TargetFillPercent.ToString());
            }
            if (PlotFillColor.HasValue)
            {
                writer.WriteAttributeString("PlotFillColor", PlotFillColor.Value.ToHexString());
            }
            if (PlotFillAlpha.HasValue)
            {
                writer.WriteAttributeString("PlotFillAlpha", PlotFillAlpha.ToString());
            }

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

            if (TargetColor.HasValue)
            {
                writer.WriteAttributeString("TargetColor", TargetColor.Value.ToHexString());
            }
            if (TargetThickness.HasValue)
            {
                writer.WriteAttributeString("TargetThickness", TargetThickness.ToString());
            }

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