Table of Contents

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

double

Properties

AxisLimits

public AxisLimits AxisLimits { get; }

Property Value

AxisLimits

BorderColor

[Obsolete("use LineColor", true)]
public Color BorderColor { get; set; }

Property Value

Color

BorderLineWidth

[Obsolete("use LineWidth", true)]
public float BorderLineWidth { get; set; }

Property Value

float

CenterLabel

Enabling this causes the value label to be rendered in the center of the bar

public bool CenterLabel { get; set; }

Property Value

bool

Error

Size of the error bar extending from Value

public double Error { get; set; }

Property Value

double

ErrorLineWidth

[Obsolete("use LineWidth", true)]
public float ErrorLineWidth { get; set; }

Property Value

float

ErrorLines

public IEnumerable<CoordinateLine> ErrorLines { get; }

Property Value

IEnumerable<CoordinateLine>

ErrorNegative

public bool ErrorNegative { get; set; }

Property Value

bool

ErrorPositive

public bool ErrorPositive { get; set; }

Property Value

bool

ErrorSize

Width of the error bar whiskers in axis units (same units as Position)

public double ErrorSize { get; set; }

Property Value

double

FillColor

public Color FillColor { get; set; }

Property Value

Color

FillHatch

public IHatch? FillHatch { get; set; }

Property Value

IHatch

FillHatchColor

public Color FillHatchColor { get; set; }

Property Value

Color

FillStyle

public FillStyle FillStyle { get; set; }

Property Value

FillStyle

IsVisible

public bool IsVisible { get; set; }

Property Value

bool

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

string

LabelOffset

Place the value label this many pixels away from the edge of the bar

public float LabelOffset { get; set; }

Property Value

float

LineColor

public Color LineColor { get; set; }

Property Value

Color

LinePattern

public LinePattern LinePattern { get; set; }

Property Value

LinePattern

LineStyle

public LineStyle LineStyle { get; set; }

Property Value

LineStyle

LineWidth

public float LineWidth { get; set; }

Property Value

float

Orientation

public Orientation Orientation { get; set; }

Property Value

Orientation

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

double

Rect

public CoordinateRect Rect { get; }

Property Value

CoordinateRect

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

double

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

double

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

double

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

string

Methods

Render(RenderPack, IAxes, SKPaint, LabelStyle)

public void Render(RenderPack rp, IAxes axes, SKPaint paint, LabelStyle labelStyle)

Parameters

rp RenderPack
axes IAxes
paint SKPaint
labelStyle LabelStyle