VectSharp 2.6.1
A light library for C# vector graphics
All Classes Namespaces Functions Variables Enumerations Properties Events Pages
VectSharp.Plots.ClusteredBars Class Reference

A plot element that draws clusters of bars. More...

Inheritance diagram for VectSharp.Plots.ClusteredBars:

Public Member Functions

 ClusteredBars (IEnumerable< IReadOnlyList< double > > data, IComparer< IReadOnlyList< double > > sorting, Func< IReadOnlyList< double >, IReadOnlyList< double > > getBaseline, ICoordinateSystem< IReadOnlyList< double > > coordinateSystem)
 Create a new ClusteredBars instance. More...
 
 ClusteredBars (IEnumerable< IReadOnlyList< double > > data, Comparison< IReadOnlyList< double > > sorting, Func< IReadOnlyList< double >, IReadOnlyList< double > > getBaseline, ICoordinateSystem< IReadOnlyList< double > > coordinateSystem)
 Create a new ClusteredBars instance. More...
 
 ClusteredBars (IEnumerable< IReadOnlyList< double > > data, ICoordinateSystem< IReadOnlyList< double > > coordinateSystem, bool vertical=true)
 Create a new ClusteredBars instance. More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target &#160;Graphics.
Parameters
targetThe Graphics on which to draw.
More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target &#160;Graphics. More...
 

Properties

bool Vertical = true [get, set]
 If this is true, the bars rise vertically above the X axis Otherwise, the bars grow horizontally from the Y axis. More...
 
SortedSet< IReadOnlyList< double > > Data [get, set]
 The data points corresponding to the tips of the bars. For each bar cluster, the data point contains an element determining the position of the cluster on the X axis (if Vertical is true, or on the Y axis otherwise), and a set of elements determining the length of each bar in the cluster. More...
 
Func< IReadOnlyList< double >, IReadOnlyList< double > > GetBaseline [get, set]
 A function that returns the bottom for each bar cluster. This function should accept a single parameter (an IReadOnlyList<T> of doubles), and return another object of the same type, representing the bottom of the cluster in data space. More...
 
double InterClusterMargin [get, set]
 The margin between consecutive bar clusters. More...
 
double IntraClusterMargin [get, set]
 The margin between consecutive bars within a single cluster. More...
 
ICoordinateSystem< IReadOnlyList< double > > CoordinateSystem [get, set]
 The coordinate system used to transform the points from data space to plot space. More...
 
IReadOnlyList< PlotElementPresentationAttributesPresentationAttributes = new PlotElementPresentationAttributes[] { new PlotElementPresentationAttributes() } [get, set]
 Presentation attributes for the bars. An element from this collection is used for each bar in the cluster; if there are more bars than elements in this collection, the presentation attributes are wrapped. More...
 
string Tag [get, set]
 A tag to identify the clustered bars in the plot. More...
 
- Properties inherited from VectSharp.Plots.IPlotElement
ICoordinateSystem CoordinateSystem [get]
 The coordinate system used to transform the points from data space to plot space. More...
 

Detailed Description

A plot element that draws clusters of bars.

Definition at line 625 of file Bars.cs.

Constructor & Destructor Documentation

◆ ClusteredBars() [1/3]

VectSharp.Plots.ClusteredBars.ClusteredBars ( IEnumerable< IReadOnlyList< double > >  data,
IComparer< IReadOnlyList< double > >  sorting,
Func< IReadOnlyList< double >, IReadOnlyList< double > >  getBaseline,
ICoordinateSystem< IReadOnlyList< double > >  coordinateSystem 
)

Create a new ClusteredBars instance.

Parameters
dataThe data points corresponding to the tips of the bars. For each bar cluster, the data point contains an element determining the position of the cluster on the X axis (if Vertical is true, or on the Y axis otherwise), and a set of elements determining the length of each bar in the cluster.
sortingA comparer used to sort the bar clusters.
getBaselineA function that returns the bottom for each bar cluster. This function should accept a single parameter (an IReadOnlyList<T> of doubles), and return another object of the same type, representing the bottom of the cluster in data space.
coordinateSystemThe coordinate system used to transform the points from data space to plot space.

Definition at line 721 of file Bars.cs.

◆ ClusteredBars() [2/3]

VectSharp.Plots.ClusteredBars.ClusteredBars ( IEnumerable< IReadOnlyList< double > >  data,
Comparison< IReadOnlyList< double > >  sorting,
Func< IReadOnlyList< double >, IReadOnlyList< double > >  getBaseline,
ICoordinateSystem< IReadOnlyList< double > >  coordinateSystem 
)

Create a new ClusteredBars instance.

Parameters
dataThe data points corresponding to the tips of the bars. For each bar cluster, the data point contains an element determining the position of the cluster on the X axis (if Vertical is true, or on the Y axis otherwise), and a set of elements determining the length of each bar in the cluster.
sortingA comparer used to sort the bar clusters.
getBaselineA function that returns the bottom for each bar cluster. This function should accept a single parameter (an IReadOnlyList<T> of doubles), and return another object of the same type, representing the bottom of the cluster in data space.
coordinateSystemThe coordinate system used to transform the points from data space to plot space.

Definition at line 740 of file Bars.cs.

◆ ClusteredBars() [3/3]

VectSharp.Plots.ClusteredBars.ClusteredBars ( IEnumerable< IReadOnlyList< double > >  data,
ICoordinateSystem< IReadOnlyList< double > >  coordinateSystem,
bool  vertical = true 
)

Create a new ClusteredBars instance.

Parameters
dataThe data points corresponding to the tips of the bars. For each bar cluster, the data point contains an element determining the position of the cluster on the X axis (if Vertical is true, or on the Y axis otherwise), and a set of elements determining the length of each bar in the cluster.
coordinateSystemThe coordinate system used to transform the points from data space to plot space.
verticalIf this is true (the default), the bars rise vertically above the X axis Otherwise, the bars grow horizontally from the Y axis.

Definition at line 752 of file Bars.cs.

Member Function Documentation

◆ Plot()

void VectSharp.Plots.ClusteredBars.Plot ( Graphics  target)

Draw the plot element on the specified target &#160;Graphics.

Parameters
targetThe Graphics on which to draw.

Implements VectSharp.Plots.IPlotElement.

Definition at line 755 of file Bars.cs.

Property Documentation

◆ CoordinateSystem

ICoordinateSystem<IReadOnlyList<double> > VectSharp.Plots.ClusteredBars.CoordinateSystem
getset

The coordinate system used to transform the points from data space to plot space.

Implements VectSharp.Plots.IPlotElement.

Definition at line 693 of file Bars.cs.

◆ Data

SortedSet<IReadOnlyList<double> > VectSharp.Plots.ClusteredBars.Data
getset

The data points corresponding to the tips of the bars. For each bar cluster, the data point contains an element determining the position of the cluster on the X axis (if Vertical is true, or on the Y axis otherwise), and a set of elements determining the length of each bar in the cluster.

Definition at line 643 of file Bars.cs.

◆ GetBaseline

Func<IReadOnlyList<double>, IReadOnlyList<double> > VectSharp.Plots.ClusteredBars.GetBaseline
getset

A function that returns the bottom for each bar cluster. This function should accept a single parameter (an IReadOnlyList<T> of doubles), and return another object of the same type, representing the bottom of the cluster in data space.

Definition at line 650 of file Bars.cs.

◆ InterClusterMargin

double VectSharp.Plots.ClusteredBars.InterClusterMargin
getset

The margin between consecutive bar clusters.

Definition at line 655 of file Bars.cs.

◆ IntraClusterMargin

double VectSharp.Plots.ClusteredBars.IntraClusterMargin
getset

The margin between consecutive bars within a single cluster.

Definition at line 674 of file Bars.cs.

◆ PresentationAttributes

IReadOnlyList<PlotElementPresentationAttributes> VectSharp.Plots.ClusteredBars.PresentationAttributes = new PlotElementPresentationAttributes[] { new PlotElementPresentationAttributes() }
getset

Presentation attributes for the bars. An element from this collection is used for each bar in the cluster; if there are more bars than elements in this collection, the presentation attributes are wrapped.

Definition at line 701 of file Bars.cs.

◆ Tag

string VectSharp.Plots.ClusteredBars.Tag
getset

A tag to identify the clustered bars in the plot.

Definition at line 706 of file Bars.cs.

◆ Vertical

bool VectSharp.Plots.ClusteredBars.Vertical = true
getset

If this is true, the bars rise vertically above the X axis Otherwise, the bars grow horizontally from the Y axis.

Definition at line 634 of file Bars.cs.


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