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

            if (ShowAxis.HasValue)
            {
                writer.WriteAttributeString("showAxis", ShowAxis.GetHashCode().ToString());
            }
            if (AxisOnLeft.HasValue)
            {
                writer.WriteAttributeString("AxisOnLeft", AxisOnLeft.GetHashCode().ToString());
            }
            if (Title.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("Title", Title);
            }
            if (TitlePos.HasValue)
            {
                writer.WriteAttributeString("TitlePos", TitlePos.ToString());
            }

            if (MaxValue.HasValue)
            {
                writer.WriteAttributeString("MaxValue", MaxValue.ToString());
            }
            if (MinValue.HasValue)
            {
                writer.WriteAttributeString("MinValue", MinValue.ToString());
            }

            if (SetAdaptiveYMin.HasValue)
            {
                writer.WriteAttributeString("setAdaptiveYMin", SetAdaptiveYMin.GetHashCode().ToString());
            }
            if (AxisLineThickness.HasValue)
            {
                writer.WriteAttributeString("axisLineThickness", AxisLineThickness.ToString());
            }
            if (TickWidth.HasValue)
            {
                writer.WriteAttributeString("tickWidth", TickWidth.ToString());
            }

            if (Color.HasValue)
            {
                writer.WriteAttributeString("Color", Color.Value.ToHexString());
            }
            if (NumDivLines.HasValue)
            {
                writer.WriteAttributeString("NumDivLines", NumDivLines.ToString());
            }

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

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

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

            if (_zeroPane != null)
            {
                _zeroPane.GenerateXmlAttributes(writer);
            }
            if (_numberFormat != null)
            {
                _numberFormat.GenerateXmlAttributes(writer);
            }
            if (_line != null)
            {
                _line.GenerateXmlAttributes(writer);
            }
        }