Class Bar
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
Represents a single bar in a bar chart
public class Bar : IHasFill, IHasLine
- Inheritance
-
Bar
- Implements
- Inherited Members
- Extension Methods
Fields
LabelInvertWhenValueBelow
Labels for bars less than this value will be displayed beneath the bar. Set this value to negative infinity to force labels to be always on top of the bar.
public double LabelInvertWhenValueBelow
Field Value
Properties
AxisLimits
public AxisLimits AxisLimits { get; }
Property Value
BorderColor
[Obsolete("use LineColor", true)]
public Color BorderColor { get; set; }
Property Value
BorderLineWidth
[Obsolete("use LineWidth", true)]
public float BorderLineWidth { get; set; }
Property Value
CenterLabel
Enabling this causes the value label to be rendered in the center of the bar
public bool CenterLabel { get; set; }
Property Value
Error
Size of the error bar extending from Value
public double Error { get; set; }
Property Value
ErrorLineWidth
[Obsolete("use LineWidth", true)]
public float ErrorLineWidth { get; set; }
Property Value
ErrorLines
public IEnumerable<CoordinateLine> ErrorLines { get; }
Property Value
ErrorNegative
public bool ErrorNegative { get; set; }
Property Value
ErrorPositive
public bool ErrorPositive { get; set; }
Property Value
ErrorSize
Width of the error bar whiskers in axis units (same units as Position)
public double ErrorSize { get; set; }
Property Value
FillColor
public Color FillColor { get; set; }
Property Value
FillHatch
public IHatch? FillHatch { get; set; }
Property Value
FillHatchColor
public Color FillHatchColor { get; set; }
Property Value
FillStyle
public FillStyle FillStyle { get; set; }
Property Value
IsVisible
public bool IsVisible { get; set; }
Property Value
Label
Text to display on, above, or below the bar. Typically this is the string representation of the value of the bar.
public string Label { get; set; }
Property Value
LabelOffset
Place the value label this many pixels away from the edge of the bar
public float LabelOffset { get; set; }
Property Value
LineColor
public Color LineColor { get; set; }
Property Value
LinePattern
public LinePattern LinePattern { get; set; }
Property Value
LineStyle
public LineStyle LineStyle { get; set; }
Property Value
LineWidth
public float LineWidth { get; set; }
Property Value
Orientation
public Orientation Orientation { get; set; }
Property Value
Position
Position (not the value) of the bar. Increment position of successive bars so they do not overlap. For simple bar plots, position of successive bars is 1, 2, 3, etc. on the horizontal axis.
public double Position { get; set; }
Property Value
Rect
public CoordinateRect Rect { get; }
Property Value
Size
Thickness of the bar in the same units as Position. Typically the size of each bar is equal to or less than the difference in Position between adjacent bars.
public double Size { get; set; }
Property Value
Value
The value this bar represents. This is the top of the bar for bars representing positive values.
public double Value { get; set; }
Property Value
ValueBase
The position where the bar begins. This is the bottom of the bar for bars representing positive values. Typically this is zero, so bars extend from zero toward their value.
public double ValueBase { get; set; }
Property Value
ValueLabel
Text to display on, above, or below the bar. Typically this is the string representation of the value of the bar.
public string ValueLabel { get; set; }
Property Value
Methods
Render(RenderPack, IAxes, SKPaint, LabelStyle)
public void Render(RenderPack rp, IAxes axes, SKPaint paint, LabelStyle labelStyle)
Parameters
rp
RenderPackaxes
IAxespaint
SKPaintlabelStyle
LabelStyle