BarPlot<T>
public class BarPlot<T> : ChartMark, IChartMarkVectorized bar plot for rendering bars from collection data. Swift Charts equivalent: BarPlot(data, x:, y:)
Constructors
Section titled “Constructors”
BarPlot(IEnumerable, Func<T, float>, Func<T, float>)
Section titled “BarPlot(IEnumerable, Func<T, float>, Func<T, float>)”public BarPlot(IEnumerable<T> data, Func<T, float> x, Func<T, float> y)Creates a BarPlot from collection data with x/y selectors. Swift Charts equivalent: BarPlot(data, x: .category, y: .value)
Parameters
| Name | Type |
|---|---|
data |
System.Collections.Generic.IEnumerable{{T}} |
x |
System.Func{{T},System.Single} |
y |
System.Func{{T},System.Single} |
BarPlot(IEnumerable, Func<T, string>, Func<T, float>)
Section titled “BarPlot(IEnumerable, Func<T, string>, Func<T, float>)”public BarPlot(IEnumerable<T> data, Func<T, string> category, Func<T, float> y)Creates a BarPlot with category labels.
Parameters
| Name | Type |
|---|---|
data |
System.Collections.Generic.IEnumerable{{T}} |
category |
System.Func{{T},System.String} |
y |
System.Func{{T},System.Single} |
Methods
Section titled “Methods”
GetMarks()
Section titled “GetMarks()”public IEnumerable<BarMark> GetMarks()Generates individual BarMarks from the data.
Returns
System.Collections.Generic.IEnumerable{ChartGuru.BarMark}
Width(float)
Section titled “Width(float)”public BarPlot<T> Width(float value)Sets mark width; selector overloads resolve a separate width for each source datum.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
ChartGuru.BarPlot`1
Width(MarkDimension)
Section titled “Width(MarkDimension)”public BarPlot<T> Width(MarkDimension dimension)Sets mark width; selector overloads resolve a separate width for each source datum.
Parameters
| Name | Type |
|---|---|
dimension |
ChartGuru.MarkDimension |
Returns
ChartGuru.BarPlot`1
Height(float)
Section titled “Height(float)”public BarPlot<T> Height(float value)Sets mark height; selector overloads resolve a separate height for each source datum.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
ChartGuru.BarPlot`1
Height(MarkDimension)
Section titled “Height(MarkDimension)”public BarPlot<T> Height(MarkDimension dimension)Sets mark height; selector overloads resolve a separate height for each source datum.
Parameters
| Name | Type |
|---|---|
dimension |
ChartGuru.MarkDimension |
Returns
ChartGuru.BarPlot`1
Dimensions(MarkDimensions)
Section titled “Dimensions(MarkDimensions)”public BarPlot<T> Dimensions(MarkDimensions<T> dimensions)Sets mark width and height together; selector overloads resolve dimensions for each source datum.
Parameters
| Name | Type |
|---|---|
dimensions |
ChartGuru.MarkDimensions{{T}} |
Returns
ChartGuru.BarPlot`1
Stacking(MarkStackingMethod)
Section titled “Stacking(MarkStackingMethod)”public BarPlot<T> Stacking(MarkStackingMethod method)Selects how marks sharing a position are combined, normalized, or centered.
Parameters
| Name | Type |
|---|---|
method |
ChartGuru.MarkStackingMethod |
Returns
ChartGuru.BarPlot`1
ForegroundStyle(Color)
Section titled “ForegroundStyle(Color)”public BarPlot<T> ForegroundStyle(Color color)Configures the fill or stroke color used by generated marks; selector overloads resolve the style separately for each datum.
Parameters
| Name | Type |
|---|---|
color |
UnityEngine.Color |
Returns
ChartGuru.BarPlot`1
ForegroundStyle(Func<T, object>)
Section titled “ForegroundStyle(Func<T, object>)”public BarPlot<T> ForegroundStyle(Func<T, object> seriesSelector)Configures the fill or stroke color used by generated marks; selector overloads resolve the style separately for each datum.
Parameters
| Name | Type |
|---|---|
seriesSelector |
System.Func{{T},System.Object} |
Returns
ChartGuru.BarPlot`1
ForegroundStyle(Func<T, Color>)
Section titled “ForegroundStyle(Func<T, Color>)”public BarPlot<T> ForegroundStyle(Func<T, Color> colorSelector)Configures the fill or stroke color used by generated marks; selector overloads resolve the style separately for each datum.
Parameters
| Name | Type |
|---|---|
colorSelector |
System.Func{{T},UnityEngine.Color} |
Returns
ChartGuru.BarPlot`1
AccessibilityLabel(Func<T, string>)
Section titled “AccessibilityLabel(Func<T, string>)”public BarPlot<T> AccessibilityLabel(Func<T, string> selector)Provides the spoken label for each generated mark when assistive chart navigation is used.
Parameters
| Name | Type |
|---|---|
selector |
System.Func{{T},System.String} |
Returns
ChartGuru.BarPlot`1
AccessibilityValue(Func<T, string>)
Section titled “AccessibilityValue(Func<T, string>)”public BarPlot<T> AccessibilityValue(Func<T, string> selector)Provides the spoken value for each generated mark when assistive chart navigation is used.
Parameters
| Name | Type |
|---|---|
selector |
System.Func{{T},System.String} |
Returns
ChartGuru.BarPlot`1
Opacity(float)
Section titled “Opacity(float)”public BarPlot<T> Opacity(float value)Configures the alpha multiplier for generated marks; selector overloads evaluate it separately for each datum.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
ChartGuru.BarPlot`1
Opacity(Func<T, float>)
Section titled “Opacity(Func<T, float>)”public BarPlot<T> Opacity(Func<T, float> selector)Configures the alpha multiplier for generated marks; selector overloads evaluate it separately for each datum.
Parameters
| Name | Type |
|---|---|
selector |
System.Func{{T},System.Single} |
Returns
ChartGuru.BarPlot`1
Position(Func<T, object>, MarkAxis)
Section titled “Position(Func<T, object>, MarkAxis)”public BarPlot<T> Position(Func<T, object> selector, MarkAxis axis = MarkAxis.Automatic)Binds projected values to a chart axis and dimension, controlling where each generated mark is laid out.
Parameters
| Name | Type |
|---|---|
selector |
System.Func{{T},System.Object} |
axis |
ChartGuru.MarkAxis |
Returns
ChartGuru.BarPlot`1
Position(Func<T, object>, MarkAxis, MarkDimension)
Section titled “Position(Func<T, object>, MarkAxis, MarkDimension)”public BarPlot<T> Position(Func<T, object> selector, MarkAxis axis, MarkDimension span)Binds projected values to a chart axis and dimension, controlling where each generated mark is laid out.
Parameters
| Name | Type |
|---|---|
selector |
System.Func{{T},System.Object} |
axis |
ChartGuru.MarkAxis |
span |
ChartGuru.MarkDimension |
Returns
ChartGuru.BarPlot`1
Position(PlottableProjection<T, TValue>, MarkAxis)
Section titled “Position(PlottableProjection<T, TValue>, MarkAxis)”public BarPlot<T> Position<TValue>(PlottableProjection<T, TValue> projection, MarkAxis axis = MarkAxis.Automatic)Binds projected values to a chart axis and dimension, controlling where each generated mark is laid out.
Parameters
| Name | Type |
|---|---|
projection |
ChartGuru.PlottableProjection{{T},{TValue}} |
axis |
ChartGuru.MarkAxis |
Returns
ChartGuru.BarPlot`1
Position(PlottableProjection<T, TValue>, MarkAxis, MarkDimension)
Section titled “Position(PlottableProjection<T, TValue>, MarkAxis, MarkDimension)”public BarPlot<T> Position<TValue>(PlottableProjection<T, TValue> projection, MarkAxis axis, MarkDimension span)Binds projected values to a chart axis and dimension, controlling where each generated mark is laid out.
Parameters
| Name | Type |
|---|---|
projection |
ChartGuru.PlottableProjection{{T},{TValue}} |
axis |
ChartGuru.MarkAxis |
span |
ChartGuru.MarkDimension |
Returns
ChartGuru.BarPlot`1
GetMorphTargets(ChartType, Rect)
Section titled “GetMorphTargets(ChartType, Rect)”public override (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)Projects this mark into plot-space geometry that the morph renderer can interpolate toward the requested chart type.
Parameters
| Name | Type |
|---|---|
targetType |
ChartGuru.ChartType |
plotArea |
UnityEngine.Rect |
Returns
System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2}
Clone()
Section titled “Clone()”public override IChartMark Clone()Creates an independent copy of this Bar Plot; later configuration changes do not affect the original instance.
Returns
ChartGuru.IChartMark
Properties
Section titled “Properties”
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }Returns
ChartGuru.ChartType
public IEnumerable<T> Data { get; }Returns
System.Collections.Generic.IEnumerable{{T}}
XSelector
Section titled “XSelector”public Func<T, float> XSelector { get; }Returns
System.Func{{T},System.Single}
YSelector
Section titled “YSelector”public Func<T, float> YSelector { get; }Returns
System.Func{{T},System.Single}
WidthDimension
Section titled “WidthDimension”public MarkDimension? WidthDimension { get; }Returns
System.Nullable{ChartGuru.MarkDimension}
HeightDimension
Section titled “HeightDimension”public MarkDimension? HeightDimension { get; }Returns
System.Nullable{ChartGuru.MarkDimension}
StackingMethod
Section titled “StackingMethod”public MarkStackingMethod StackingMethod { get; }Returns
ChartGuru.MarkStackingMethod