Summary description for ChartLegend.
Inheritance: IContent
コード例 #1
0
        /// <summary>
        /// create the chart legend
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>

        private IContent CreateChartLegend(XmlNode node)
        {
            try
            {
                ChartLegend legend = new ChartLegend(this.Chart.Document, node);
                legend.Chart = this.Chart;
                //legend.Node                  = node;
                this.Chart.ChartLegend = legend;
                ChartStyleProcessor csp       = new ChartStyleProcessor(this.Chart);
                XmlNode             nodeStyle = csp.ReadStyleNode(legend.StyleName);
                IStyle style = csp.ReadStyle(nodeStyle, "legend");

                if (style != null)
                {
                    legend.Style = style;
                    this.Chart.Styles.Add(style);
                }

                return(legend);
            }

            catch (Exception ex)
            {
                throw new AODLException("Exception while creating the chart legend!", ex);
            }
        }
コード例 #2
0
 public void New()
 {
     IsNewed = true;
     LoadBlankContent();
     LoadBlankStyles();
     InitStandards();
     ChartLegend = new ChartLegend(this, "ch2");
     ChartTitle  = new ChartTitle(this, "ch3");
     ChartTitle.InitTitle();
     Content.Add(ChartTitle);
     ChartPlotArea = new ChartPlotArea(this, "ch4");
     if (Frame == null)
     {
         Frame = new Frame(Document, "gr1");
         //this.CreateParentNode (null);
         Frame.Content.Add(this);
     }
     InitChart();
 }
コード例 #3
0
		/// <summary>
		/// create the chart legend
		/// </summary>
		/// <param name="node"></param>
		/// <returns></returns>

		private IContent CreateChartLegend(XmlNode node)
		{
			try
			{
				ChartLegend legend           = new ChartLegend (this.Chart .Document ,node);
				legend.Chart                 = this.Chart ;
				//legend.Node                  = node;
				this.Chart .ChartLegend      =legend;
				ChartStyleProcessor csp      = new ChartStyleProcessor (this.Chart );
				XmlNode nodeStyle            = csp.ReadStyleNode(legend.StyleName);
				IStyle style                 = csp.ReadStyle (nodeStyle,"legend");

				if (style != null)
				{
					legend.Style             =style;
					this.Chart .Styles .Add (style);
				}

				return  legend;
			}

			catch(Exception ex)
			{
				throw new AODLException("Exception while creating the chart legend!", ex);
			}
		}