Skip to content

Bar3DMark

ClassChartGuruChartGuru.3D
public class Bar3DMark : ChartMark3D, IChart3DMark, IChart3DDataMark, IChartMark

Extruded column bar. The X/Z coordinates position the bar, and the Y value defines its height; Width and Depth control its footprint on the X/Z plane.

public Bar3DMark(float x, float y, float z)

Creates a bar standing at x and z that spans from zero to the value y, 0.8 data units wide and deep and unstacked until Bar3DMark.Stacking(MarkStackingMethod) changes it.

Parameters

NameType
xSystem.Single
ySystem.Single
zSystem.Single
public Bar3DMark(DataPoint3D p)

Creates a bar from the X, Y and Z of p as Bar3DMark.Bar3DMark(float, float, float) does, keeping the point’s identity and other fields.

Parameters

NameType
pChartGuru.DataPoint3D

public Bar3DMark Width(float w)

Sets the bar’s width along X in X data units, at least 0.01; the default 0.8 leaves a gap between bars one unit apart. On an X domain shorter than one unit it is a share of the plot’s width.

Parameters

NameType
wSystem.Single

Returns

ChartGuru.Bar3DMark

public Bar3DMark Depth(float d)

Sets the bar’s depth along Z in Z data units like Bar3DMark.Width(float), at least 0 and 0.8 by default. A stacked bar stands at the plot’s depth center and takes this share of the whole plot depth instead.

Parameters

NameType
dSystem.Single

Returns

ChartGuru.Bar3DMark

public Bar3DMark CornerRadius(float radius)

Rounds the bar’s edges by radius plot units, limited to half its shortest side; 0, the default, keeps square edges.

Parameters

NameType
radiusSystem.Single

Returns

ChartGuru.Bar3DMark

public Bar3DMark Stacking(MarkStackingMethod method)

Sets how the bar combines with the other bars at its X. MarkStackingMethod.Unstacked, the default, stands it alone at its X and Z; the stacking methods pile it onto the others from zero, as shares filling 0 to 1 or centered on zero, at the plot’s depth center with its Z ignored.

Parameters

NameType
methodChartGuru.MarkStackingMethod

Returns

ChartGuru.Bar3DMark

public Bar3DMark Stacked()

Stacks the bar onto the other stacked bars at its X, starting at zero; shortcut for Stacking(MarkStackingMethod.Standard).

Returns

ChartGuru.Bar3DMark

public Bar3DMark Grouped()

Stands the bar alone at its X and Z, so series at different Z positions form rows instead of a stack; shortcut for Stacking(MarkStackingMethod.Unstacked), the default.

Returns

ChartGuru.Bar3DMark

public Bar3DMark Normalized()

Stacks the bar with the other bars at its X as shares of their total, so every stack fills 0 to 1; shortcut for Stacking(MarkStackingMethod.Normalized).

Returns

ChartGuru.Bar3DMark

public Bar3DMark Centered()

Stacks the bar with the other bars at its X centered on zero, like a streamgraph; shortcut for Stacking(MarkStackingMethod.Center).

Returns

ChartGuru.Bar3DMark

public override void BuildMesh(Chart3DMeshContext ctx)

Write triangles / instanced draws for this mark into the context registry.

Parameters

NameType
ctxChartGuru.Chart3DMeshContext
public override IChartMark Clone()

Creates an independent copy of this bar with its position, footprint, corner radius, stacking and style; later changes to either mark do not affect the other.

Returns

ChartGuru.IChartMark

public float WidthRatio { get; }

Returns

System.Single

public float DepthRatio { get; }

Returns

System.Single

public float CornerRadiusValue { get; }

Returns

System.Single

public MarkStackingMethod StackingMethod { get; set; }

Returns

ChartGuru.MarkStackingMethod

public override ChartType MarkType { get; }

Returns

ChartGuru.ChartType