Represents the base class for many visual elements of the chart such as the legend, title, and chart areas. Defines the position of the chart element in relative coordinates, which range from (0,0) to (100,100).
public ref class ElementPosition : System::Windows::Forms::DataVisualization::Charting::ChartElement
public class ElementPosition : System.Windows.Forms.DataVisualization.Charting.ChartElement
type ElementPosition = class inherit ChartElement
Public Class ElementPosition Inherits ChartElement
The ElementPosition class is always exposed as a
Position property, such as Position, Position, and so forth. It is also exposed in the PrePaint and PostPaint events of the Chart control as a property of the ChartPaintEventArgs object.
The position of the applicable chart elements can be set automatically by setting the Auto property to
true; chart elements can also be positioned at design time in the Design View.
There are two major differences between this class and a RectangleF structure:
This class can use automatic positioning.
This class only uses coordinates ranging from 0 to 100, otherwise an exception is thrown.
The position of chart elements is described using relative coordinates, with the top-left corner of an element having coordinates of (0,0) and the bottom-right corner of an element having coordinates of (100,100).
Elements that are plotted within a chart area use coordinates that are relative to the chart area, whereas elements outside a chart area use coordinates that are relative to the chart image.
|ElementPosition() ElementPosition() ElementPosition() ElementPosition()||
Initializes a new instance of the ElementPosition class.
|ElementPosition(Single, Single, Single, Single) ElementPosition(Single, Single, Single, Single) ElementPosition(Single, Single, Single, Single) ElementPosition(Single, Single, Single, Single)||
Initializes a new instance of the ElementPosition class with the specified
|Auto Auto Auto Auto||
Gets or sets a value that indicates whether an applicable chart element will be positioned automatically by the Chart control.
|Bottom Bottom Bottom Bottom||
Gets the bottom position of a chart element, in relative coordinates.
|Height Height Height Height||
Gets or sets the height of a chart element.
|Right Right Right Right||
Gets the position of the right side of a chart element, in relative coordinates.
|Size Size Size Size||
Gets the size of a chart element.
|Tag Tag Tag Tag||
Gets or sets an object associated with this chart element.(Inherited from ChartElement)
|Width Width Width Width||
Gets or sets the width of a chart element.
|X X X X||
Gets or sets the relative X-coordinate of the top-left corner of an applicable chart element.
|Y Y Y Y||
Gets or sets the relative Y-coordinate of the top-left corner of an applicable chart element.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.