예제 #1
0
        private void BuildChartAxisTabs(PropertyTypeEnum type)
        {
            string propName;

            if (type == PropertyTypeEnum.CategoryAxis)
            {
                this.Text = "Chart Category (X) Axis";
                propName  = "CategoryAxis";
            }
            else
            {
                this.Text = "Chart Value (Y) Axis";
                propName  = "ValueAxis";
            }

            XmlNode cNode  = _Nodes[0];
            XmlNode aNode  = _Draw.GetCreateNamedChildNode(cNode, propName);
            XmlNode axNode = _Draw.GetCreateNamedChildNode(aNode, "Axis");

            // Now we replace the node array with a new one containing only the legend
            _Nodes = new List <XmlNode>();
            _Nodes.Add(axNode);

            EnsureStyle();              // Make sure we have Style nodes

            // Chart Axis
            ChartAxisCtl cac = new ChartAxisCtl(_Draw, this._Nodes);

            AddTab("Axis", cac);

            // Style Text
            StyleTextCtl stc = new StyleTextCtl(_Draw, this._Nodes);

            AddTab("Text", stc);

            // Border tab
            StyleBorderCtl bc = new StyleBorderCtl(_Draw, null, this._Nodes);

            AddTab("Border", bc);

            // Style tab
            StyleCtl sc = new StyleCtl(_Draw, this._Nodes);

            AddTab("Style", sc);
        }
예제 #2
0
        private void BuildChartAxisTabs(PropertyTypeEnum type)
        {
            string propName;
            if (type == PropertyTypeEnum.CategoryAxis)
            {
                this.Text = "Chart Category (X) Axis";
                propName = "CategoryAxis";
            }
            else
            {
                this.Text = "Chart Value (Y) Axis";
                propName = "ValueAxis";
            }

            XmlNode cNode = _Nodes[0];
            XmlNode aNode = _Draw.GetCreateNamedChildNode(cNode, propName);
            XmlNode axNode = _Draw.GetCreateNamedChildNode(aNode, "Axis");

            // Now we replace the node array with a new one containing only the legend
            _Nodes = new List<XmlNode>();
            _Nodes.Add(axNode);

            EnsureStyle();	// Make sure we have Style nodes

            // Chart Axis
            ChartAxisCtl cac = new ChartAxisCtl(_Draw, this._Nodes);
            AddTab("Axis", cac);

            // Style Text
            StyleTextCtl stc = new StyleTextCtl(_Draw, this._Nodes);
            AddTab("Text", stc);

            // Border tab
            StyleBorderCtl bc = new StyleBorderCtl(_Draw, null, this._Nodes);
            AddTab("Border", bc);

            // Style tab
            StyleCtl sc = new StyleCtl(_Draw, this._Nodes);
            AddTab("Style", sc);
        }