VectSharp 2.6.1
A light library for C# vector graphics
|
A plot element that draws a text label at each data point. More...
Public Member Functions | |||
DataLabels (IEnumerable< T > data, ICoordinateSystem< T > coordinateSystem) | |||
Creates a new DataLabels<T> instance. More... | |||
void | Plot (Graphics target) | ||
Draw the plot element on the specified target  Graphics.
| |||
void | Plot (Graphics target) | ||
Draw the plot element on the specified target  Graphics. More... | |||
Properties | |
IEnumerable< T > | Data [get, set] |
The data points at which the labels will be drawn. More... | |
Func< int, T, object > | Label [get, set] |
A function used to determine the text of the labels to draw. The arguments for this function should be a int representing the index of the data point and a T representing the coordinates of the data point. This function should return either an IEnumerable<T> of FormattedText objects, which will be used as-is, or any other kind of object, which will be converted to a string to be used in the label. More... | |
Func< int, T, double > | Rotation = (i, d) => 0 [get, set] |
A function used to determine the orientation of the labels with respect to the horizontal. The arguments for this function should be a int representing the index of the data point and a T representing the coordinates of the data point. This function should return a double representing the angle with respect to the horizontal at which the label should be drawn. More... | |
Func< int, T, Point > | Margin = (i, d) => new Point() [get, set] |
A function used to determine the position of the labels with respect to the data points. The arguments for this function should be a int representing the index of the data point and a T representing the coordinates of the data point. This function should return a Point defining the amount of space between the data point and the label, in plot coordinates. More... | |
TextBaselines | Baseline = TextBaselines.Middle [get, set] |
The baseline for the labels. More... | |
TextAnchors | Alignment = TextAnchors.Center [get, set] |
The alignment for the labels. More... | |
ICoordinateSystem< T > | CoordinateSystem [get, set] |
The coordinate system used to transform the points from data space to plot space. More... | |
PlotElementPresentationAttributes | PresentationAttributes = new PlotElementPresentationAttributes() { Stroke = null } [get, set] |
Presentation attributes determining the appearance of the labels. More... | |
string | Tag [get, set] |
A tag to identify the labels in the plot. More... | |
![]() | |
ICoordinateSystem | CoordinateSystem [get] |
The coordinate system used to transform the points from data space to plot space. More... | |
A plot element that draws a text label at each data point.
T | The kind of data describing the data points (generally, IReadOnlyList<double> ). |
Definition at line 336 of file DataPoints.cs.
VectSharp.Plots.DataLabels< T >.DataLabels | ( | IEnumerable< T > | data, |
ICoordinateSystem< T > | coordinateSystem | ||
) |
Creates a new DataLabels<T> instance.
data | The data points at which the labels will be drawn. |
coordinateSystem | The coordinate system used to transform the points from data space to plot space. |
Definition at line 445 of file DataPoints.cs.
void VectSharp.Plots.DataLabels< T >.Plot | ( | Graphics | target | ) |
Draw the plot element on the specified target  Graphics.
target | The Graphics on which to draw. |
Implements VectSharp.Plots.IPlotElement.
Definition at line 465 of file DataPoints.cs.
|
getset |
The alignment for the labels.
Definition at line 422 of file DataPoints.cs.
|
getset |
The baseline for the labels.
Definition at line 417 of file DataPoints.cs.
|
getset |
The coordinate system used to transform the points from data space to plot space.
Implements VectSharp.Plots.IPlotElement.
Definition at line 427 of file DataPoints.cs.
|
getset |
The data points at which the labels will be drawn.
Definition at line 341 of file DataPoints.cs.
|
getset |
A function used to determine the text of the labels to draw. The arguments for this function should be a int
representing the index of the data point and a T representing the coordinates of the data point. This function should return either an IEnumerable<T> of FormattedText objects, which will be used as-is, or any other kind of object, which will be converted to a string
to be used in the label.
Definition at line 352 of file DataPoints.cs.
|
getset |
A function used to determine the position of the labels with respect to the data points. The arguments for this function should be a int
representing the index of the data point and a T representing the coordinates of the data point. This function should return a Point defining the amount of space between the data point and the label, in plot coordinates.
Definition at line 412 of file DataPoints.cs.
|
getset |
Presentation attributes determining the appearance of the labels.
Definition at line 433 of file DataPoints.cs.
|
getset |
A function used to determine the orientation of the labels with respect to the horizontal. The arguments for this function should be a int
representing the index of the data point and a T representing the coordinates of the data point. This function should return a double
representing the angle with respect to the horizontal at which the label should be drawn.
Definition at line 405 of file DataPoints.cs.
|
getset |
A tag to identify the labels in the plot.
Definition at line 438 of file DataPoints.cs.