Skip to content
ChartForgeX

Pyramid examples in C#

Pyramid examples rendered by ChartForgeX: a live chart, variants in light and dark themes, the C# source and the options to configure it.

All charts Parts of a wholePyramid

How work is allocated across services

The interactive HTML page ChartForgeX writes for this chart. Hover for values, click legend items to hide or show series, use the keyboard to navigate, and right-click for export and reset. Where the chart can redraw a zoomed range, use the wheel to zoom, choose Pan to move the window, or choose Brush and drag to zoom to a range.

Build it in C#

This is the code for the chart above. Show setup adds the imports before it and the few lines that write SVG, PNG and HTML after it, so it reads as one program; the download is the complete console program, ready to run with the ChartForgeX package.

C# Program.cs Download
Loading source…

Variants

Options

Set these on chart.ConfigurePyramid(options => …). The full list is on the ChartPyramidOptions reference page.

OptionWhat it does
ValueEncodingGets or sets the proportional quantity. The default is segment height, independently of orientation.
OrientationGets or sets the tip-to-base direction. The default places the tip above the base.
ReversedGets or sets whether the tip-to-base direction is reversed. Category order and source identities stay unchanged.
AspectRatioGets or sets the base width divided by tip-to-base length, independently of orientation.
LabelContentGets or sets combined (default) or independently positioned component captions. Shared data labels must be enabled.
CategoryLabelGets independent category visibility, physical placement and typography in Separate mode. Null inherits series/chart placement; Auto prefers the outside rail.
ValueLabelGets independent value visibility, physical placement and typography in Separate mode. Null inherits series/chart placement; Auto prefers the mark interior.
PartitionOutlineGets or sets the optional shared partition outline policy. Point stroke colors take precedence over its color; null preserves the existing unoutlined partition or Cone line.