Пример #1
0
		/// <summary>
		/// Add a bar type curve (<see c_ref="CurveItem"/> object) to the plot with
		/// the given data points (double arrays) and properties.
		/// This is simplified way to add curves without knowledge of the
		/// <see c_ref="CurveList"/> class.  An alternative is to use
		/// the <see c_ref="ZedGraph.CurveList" /> Add() method.
		/// </summary>
		/// <param name="label">The text label (string) for the curve that will be
		/// used as a <see c_ref="Legend"/> entry.</param>
		/// <param name="x">An array of double precision X values (the
		/// independent values) that define the curve.</param>
		/// <param name="y">An array of double precision Y values (the
		/// dependent values) that define the curve.</param>
		/// <param name="color">The color to used for the bars</param>
		/// <returns>A <see c_ref="CurveItem"/> class for the newly created bar curve.
		/// This can then be used to access all of the curve properties that
		/// are not defined as arguments to the
		/// <see c_ref="AddBar(string,double[],double[],Color)"/> method.</returns>
		public BarItem AddBar( string label, double[] x, double[] y, Color color )
		{
			BarItem curve = new BarItem( label, x, y, color );
			_curveList.Add( curve );

			return curve;
		}
Пример #2
0
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The <see c_ref="BarItem"/> object from which to copy</param>
		public BarItem( BarItem rhs ) : base( rhs )
		{
			//bar = new Bar( rhs.Bar );
			_bar = rhs._bar.Clone();
		}
Пример #3
0
		/// <summary>
		/// Add a bar type curve (<see c_ref="CurveItem"/> object) to the plot with
		/// the given data points (<see c_ref="IPointList"/>) and properties.
		/// This is simplified way to add curves without knowledge of the
		/// <see c_ref="CurveList"/> class.  An alternative is to use
		/// the <see c_ref="ZedGraph.CurveList" /> Add() method.
		/// </summary>
		/// <param name="label">The text label (string) for the curve that will be
		/// used as a <see c_ref="Legend"/> entry.</param>
		/// <param name="points">A <see c_ref="IPointList"/> of double precision value pairs that define
		/// the X and Y values for this curve</param>
		/// <param name="color">The color to used to fill the bars</param>
		/// <returns>A <see c_ref="CurveItem"/> class for the newly created bar curve.
		/// This can then be used to access all of the curve properties that
		/// are not defined as arguments to the
		/// <see c_ref="AddBar(string,IPointList,Color)"/> method.</returns>
		public BarItem AddBar( string label, IPointList points, Color color )
		{
			BarItem curve = new BarItem( label, points, color );
			_curveList.Add( curve );

			return curve;
		}