ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.Plottables.BarPlot Class Reference

Holds a collection of individually styled bars. More...

Inheritance diagram for ScottPlot.Plottables.BarPlot:
ScottPlot.IPlottable ScottPlot.IHasLegendText

Public Member Functions

 BarPlot (List< Bar > bars)
 
AxisLimits GetAxisLimits ()
 Return the 2D area (in coordinate space) occupied by the data contained in this plottable.
 
virtual void Render (RenderPack rp)
 Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.
 

Properties

string Label [get, set]
 
string LegendText = string.Empty [get, set]
 If populated, this text appears in the legend.
 
bool IsVisible = true [get, set]
 Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).
 
IAxes Axes = new Axes() [get, set]
 This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.
 
List< BarBars [get]
 
LabelStyle ValueLabelStyle [get, set]
 
Color Color [set]
 Apply a fill color to all bars.
 
bool Horizontal [set]
 Define orientation for all bars.
 
IEnumerable< LegendItemLegendItems [get]
 Items which will appear in the legend.
 
- Properties inherited from ScottPlot.IPlottable
- Properties inherited from ScottPlot.IHasLegendText

Detailed Description

Holds a collection of individually styled bars.

Constructor & Destructor Documentation

◆ BarPlot()

ScottPlot.Plottables.BarPlot.BarPlot ( List< Bar bars)
inline

Member Function Documentation

◆ GetAxisLimits()

AxisLimits ScottPlot.Plottables.BarPlot.GetAxisLimits ( )
inline

Return the 2D area (in coordinate space) occupied by the data contained in this plottable.

Implements ScottPlot.IPlottable.

◆ Render()

virtual void ScottPlot.Plottables.BarPlot.Render ( RenderPack  rp)
inlinevirtual

Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.

Implements ScottPlot.IPlottable.

Property Documentation

◆ Axes

IAxes ScottPlot.Plottables.BarPlot.Axes = new Axes()
getset

This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.

Implements ScottPlot.IPlottable.

◆ Bars

List<Bar> ScottPlot.Plottables.BarPlot.Bars
get

◆ Color

Color ScottPlot.Plottables.BarPlot.Color
set

Apply a fill color to all bars.

◆ Horizontal

bool ScottPlot.Plottables.BarPlot.Horizontal
set

Define orientation for all bars.

◆ IsVisible

bool ScottPlot.Plottables.BarPlot.IsVisible = true
getset

Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).

Implements ScottPlot.IPlottable.

◆ Label

string ScottPlot.Plottables.BarPlot.Label
getset

◆ LegendItems

IEnumerable<LegendItem> ScottPlot.Plottables.BarPlot.LegendItems
get

Items which will appear in the legend.

Implements ScottPlot.IPlottable.

◆ LegendText

string ScottPlot.Plottables.BarPlot.LegendText = string.Empty
getset

If populated, this text appears in the legend.

Implements ScottPlot.IHasLegendText.

◆ ValueLabelStyle

LabelStyle ScottPlot.Plottables.BarPlot.ValueLabelStyle
getset
Initial value:
= new()
{
Alignment = Alignment.LowerCenter,
}
Alignment
Represents the location of a point relative to a rectangle. UpperLeft means the point is at the top l...
Definition Alignment.cs:8

The documentation for this class was generated from the following file: