Summary description for ChartDataPoint.
Inheritance: IContent
Beispiel #1
0
        /// <summary>
        /// create the chart data point
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>

        private IContent CreateChartDataPoint(XmlNode node)
        {
            try
            {
                ChartDataPoint datapoint = new ChartDataPoint(this.Chart.Document, node);
                //grid.Node                   = node;
                datapoint.Chart = this.Chart;

                ChartStyleProcessor csp       = new ChartStyleProcessor(this.Chart);
                XmlNode             nodeStyle = csp.ReadStyleNode(datapoint.StyleName);
                IStyle style = csp.ReadStyle(nodeStyle, "datapoint");

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

                return(datapoint);
            }

            catch (Exception ex)
            {
                throw new AODLException("Exception while creating the chart datapoint!", ex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// create a single series
        /// </summary>
        /// <param name="rowStartIndex">the start row index</param>
        /// <param name="rowEndINdex">the end row index</param>
        /// <param name="colStartIndex">the start col index</param>
        /// <param name="colEndIndex">the end col index</param>
        private void CreateSingleSeries(int rowStartIndex, int rowEndINdex, int colStartIndex, int colEndIndex)
        {
            for (int i = rowStartIndex; i <= rowEndINdex; i++)
            {
                string      styleRowname = "ch1" + i.ToString();
                ChartSeries series       = new ChartSeries(this, styleRowname);

                if (this.ChartType == "Circle")
                {
                    for (int j = colStartIndex; j <= colEndIndex; j++)
                    {
                        string         styleColname = "ch2" + j.ToString();
                        ChartDataPoint dataPoint    = new ChartDataPoint(this, styleColname);
                        series.DataPointCollection.Add(dataPoint);
                    }
                }
                else
                {
                    string         pointStylename = "ch3" + i.ToString();
                    ChartDataPoint dataPoint      = new ChartDataPoint(this, pointStylename);
                    int            Repeated       = colEndIndex - colStartIndex + 1;
                    dataPoint.Repeated = Repeated.ToString();
                    series.DataPointCollection.Add(dataPoint);
                }

                this.ChartPlotArea.SeriesCollection.Add(series);
            }
        }
		/// <summary>
		/// create a single series
		/// </summary>
		/// <param name="rowStartIndex">the start row index</param>
		/// <param name="rowEndINdex">the end row index</param>
		/// <param name="colStartIndex">the start col index</param>
		/// <param name="colEndIndex">the end col index</param>
		private void CreateSingleSeries(int rowStartIndex,int rowEndINdex,int colStartIndex,int colEndIndex)
		{
			for(int i=rowStartIndex; i<= rowEndINdex; i++)
			{
				string styleRowname= "ch1"+i.ToString ();
				ChartSeries series = new ChartSeries (this,styleRowname);
				
				if (this.ChartType =="Circle")
				{
					for(int j=colStartIndex; j<=colEndIndex; j++)
					{
						string styleColname = "ch2"+j.ToString ();
						ChartDataPoint dataPoint = new ChartDataPoint (this,styleColname);
						series.DataPointCollection .Add (dataPoint);
					}
				}
				else
				{
					string  pointStylename = "ch3"+i.ToString ();
					ChartDataPoint dataPoint= new ChartDataPoint (this,pointStylename);
					int Repeated = colEndIndex-colStartIndex+1;
					dataPoint.Repeated =Repeated.ToString ();
					series.DataPointCollection .Add (dataPoint);
				}

				this.ChartPlotArea .SeriesCollection .Add (series);
			}


		}
		/// <summary>
		/// create the chart data point
		/// </summary>
		/// <param name="node"></param>
		/// <returns></returns>

		private IContent CreateChartDataPoint(XmlNode node)
		{
			try
			{
				ChartDataPoint datapoint              = new ChartDataPoint(this.Chart .Document ,node);
				//grid.Node                   = node;
				datapoint.Chart                       = this.Chart ;

				ChartStyleProcessor csp               = new ChartStyleProcessor (this.Chart );
				XmlNode nodeStyle                     = csp.ReadStyleNode(datapoint.StyleName);
				IStyle style                          = csp.ReadStyle (nodeStyle,"datapoint");

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

				return datapoint;
			}

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