Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Bullet chart

Since 0.1.0-alpha.23
Shows measures against their targets and ranges, a row each, such as a KPI scorecard.

IzzyBlazor.BulletChart<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly and its doc comments.

Properties (23)

RefreshTimeSpan?Added in 0.1.0-alpha.23

How often the chart reads its data again, at least a second, such as Refresh="TimeSpan.FromSeconds(30)". On a static page the page (or RefreshFrom) is fetched again and the chart drawn from it, found by its id, which it then needs; on an interactive page OnRefresh is raised, for you to load new data. Not while the tab is hidden or the chart is off-screen, nor (static) while the pointer or focus is in it. Unlike Chart's, it has no Pause button.

RefreshFromstring?Added in 0.1.0-alpha.23

On a static page with Refresh: a lighter page to fetch than this one, which renders the same chart with the same id.

ItemsIEnumerable<TItem>? requiredAdded in 0.1.0-alpha.23

The items, a row each, in order.

LabelExpression<Func<TItem, object?>> requiredAdded in 0.1.0-alpha.23

Each row's name, such as k => k.Name: beside its row, and its meter's accessible name.

ValueExpression<Func<TItem, object?>> requiredAdded in 0.1.0-alpha.23

Each row's value, such as k => k.Actual: the bar. A missing value draws no bar.

TargetExpression<Func<TItem, object?>>?Added in 0.1.0-alpha.23

Each row's goal, such as k => k.Goal: a tick across the row, read with the value.

MaxExpression<Func<TItem, object?>>?Added in 0.1.0-alpha.23

Each row's own scale end, such as k => k.Max: the rows then each have their own scale and ticks, for measures in different units or sizes. Without it, the rows share one scale, from Min to past the largest value, target and range, and one axis.

Mindouble = 0Added in 0.1.0-alpha.23

Where every row's scale starts. Defaults to 0; any other start draws each value as a dot rather than a bar, since a bar's length would no longer be the value.

RangesFunc<TItem, IEnumerable?>?Added in 0.1.0-alpha.23

Each row's ranges, such as k => k.Thresholds: the ends of all but the last, in order, numbers of any type ([150, 225] on a scale to 300 makes three ranges). The last runs to the row's max. For the same ranges on every row, use GaugeBands inside the chart instead.

RangeLabelsIReadOnlyList<string>?Added in 0.1.0-alpha.23

What Ranges' ranges mean, in order, such as ["Poor", "Fair", "Good"]: in the tooltip, the table and the meter's words, so color isn't the only cue. One per range.

PaletteChartPalette? (computed)Added in 0.1.0-alpha.23

The ranges' colors, in order, such as ChartPalette.Of(Color.Danger, Color.Warning, Color.Success), drawn as tints so the bar stays the strongest mark. Defaults to grays, darkest first (Few's: the darkest is the poor end).

AccentAccent? (computed)Added in 0.1.0-alpha.23

The bar's color, such as Accent.Of("#0d9488"). Defaults to the text color, dimmed a little in dark mode so it doesn't glare.

ValueFormatstring?Added in 0.1.0-alpha.23

A .NET format string for the values, targets and ticks, such as C0, N0 or P0.

FormatFunc<TItem, string?>?Added in 0.1.0-alpha.23

Each row's own format string, such as k => k.Format, for rows in different units (revenue in C0 beside a margin in P0); a null falls back to ValueFormat.

OrientationOrientation = Orientation.HorizontalAdded in 0.1.0-alpha.23

Rows across (horizontal, the default) or standing up as columns, their labels above.

Titlestring?Added in 0.1.0-alpha.23

The chart's title, such as "Q3 against plan", shown above it as its caption. It also names the chart for screen readers. A chart needs a Title or TitledBy.

HideTitlebool = falseAdded in 0.1.0-alpha.23

Hides the title, which still names the chart for screen readers.

TitleAlignChartAlign = ChartAlign.StartAdded in 0.1.0-alpha.23

Where the title sits: at the start by default (the left, in a left-to-right page); ChartAlign.Center or ChartAlign.End.

TitledBystring?Added in 0.1.0-alpha.23

The id of a heading already on the page that titles the chart, such as a card's, in place of Title: the chart takes its name from it and shows no title of its own.

Downloadbool = falseAdded in 0.1.0-alpha.23

Shows a button across from the title that saves the chart as a PNG, named after its title, in the color scheme on screen. With JavaScript off there's no button.

Tooltipbool = trueAdded in 0.1.0-alpha.23

A tooltip for the row under the pointer or keyboard focus. On by default.

DataTableChartDataTable = ChartDataTable.PopoverAdded in 0.1.0-alpha.23

The values as a table: by default behind a "Show data" button that opens it over the chart; ChartDataTable.Collapsed puts it in a disclosure under the chart.

ChildContentRenderFragment?Added in 0.1.0-alpha.23

GaugeBands: ranges every row shares, on the shared scale.

Events (1)

OnRefreshEventCallbackAdded in 0.1.0-alpha.23Interactive only

On an interactive page with Refresh: raised at each interval, to load new data.

Parts (1)

Components written inside BulletChart, documented here with it.

GaugeBand

A range on a Gauge's dial or a LinearGauge's scale, such as where a load turns high: <GaugeBand From="0.7" To="0.9" Accent="Accent.From(Color.Warning)" Label="High" />. It's drawn along the scale (a thin arc on a dial's outer edge), in its Accent or the gauge's palette color for its place; a value inside it fills in that color (not in a gray), and its Label shows under the value. In a BulletChart<T>, a range every row shares.

Fromdouble requiredAdded in 0.1.0-alpha.22

Where the band starts, on the gauge's scale.

Todouble requiredAdded in 0.1.0-alpha.22

Where the band ends.

AccentAccent?Added in 0.1.0-alpha.22

The band's color, such as Accent.From(Color.Warning) or Accent.Danger, in place of the gauge's Palette color for its place.

Labelstring?Added in 0.1.0-alpha.22

What a value in the band means, such as "High": shown under the value when it's in the band, and read with it, so the color isn't the only cue.

Types (5)

Accent

class

The color of a control: buttons, badges, tags, banners, progress bars and menu items. Primary, Neutral and Danger are the roles; emphasis comes from the variant (solid, soft, outline, ghost, link), not from more colors. For one control in another color, use Of (any CSS color) or Token (a theme token); text on it is chosen for contrast.

Accent members
MemberDescription
Primary

The brand color, for the main action.

Neutral

A quiet, gray action.

Danger

A destructive action, such as Delete.

Of(string css)

Any CSS color, such as "#0d9488". Text on it is black or white, whichever reads better.

Token(string name)

A theme token, such as "brand" for --ib-color-brand; text on it uses --ib-color-on-brand when the theme defines it.

From(Color color)

A Color as an accent, such as Color.Success.

ChartAlign

enum

Where a chart's title or legend sits along its edge: for a title or a legend above or below, left, center or right (in a left-to-right page); for a legend beside the chart, top, middle or bottom.

ChartAlign values
ValueDescription
Start

At the start: the left (in a left-to-right page), or the top beside the chart.

Center

Centered.

End

At the end: the right (in a left-to-right page), or the bottom beside the chart.

ChartDataTable

enum

How a chart offers its values as a table.

ChartDataTable values
ValueDescription
Popover

A "Show data" button under the chart that opens the table in a popover over it, so nothing on the page moves (the default). It works with JavaScript off.

Collapsed

A "Show data" disclosure under the chart, closed until opened, that pushes what's below down: for a report read top to bottom, with the chart and table seen together.

Visible

The table shows under the chart.

None

No table, for a page that lists the values elsewhere.

ChartPalette

class

The colors a Chart<T> or PieChart<T> gives its series or slices, or a Gauge its bands, in order: Colors (the default: the theme's palette, set with ChartPalette), one palette whatever the theme's (Contrast, OkabeIto, Calm), one series picked out with Emphasis, Shades of one color, Diverging between two, or your own with Of. Shades and diverging ramps are sampled for the number of series, so three get three even steps, and they turn round in dark mode, where the strongest color is the lightest.

ChartPalette members
MemberDescription
Colors

Distinct colors, for series that aren't in an order, such as regions or products. The default. A chart of exactly two, three or four series gets a set picked for that count, so every pair stays apart for color-blind readers (--ib-chart-of2-1 and on); any other count takes the theme's eight in order (--ib-chart-1 to --ib-chart-8). Which palette that is follows ChartPalette: Brand unless set, so the first series, or a chart's only one, is the brand color. The count is the series a chart defines, so hiding one never repaints the rest.

Contrast

The Contrast palette whatever the theme's: eight colors of one lightness, each 3:1 or more on the surface, with sets picked for two, three or four series. The same in every app: it doesn't follow the brand.

OkabeIto

The Okabe-Ito palette whatever the theme's: the widely used color-blind-safe set, seven colors and then gray.

Calm

The Calm palette whatever the theme's: muted colors, for dashboards read all day.

Emphasis(int index, Color? color)

One series in color and every other one in gray, for a chart that makes a point about one series, such as this year against earlier years or one store against the rest. The gray is the text color mixed into the surface, so it keeps 3:1 on the surface in both schemes and the other series stay readable as context. The grays are alike, so give the series names: the legend and tooltips tell them apart. On a line chart, define the picked series last so it's drawn on top.

Shades(Color color)

Light to dark shades of one color, for series in an order, such as age bands or plan tiers: the first series is the lightest. Past about six, shades are hard to tell apart.

Tints(Color color)

Light tints of one color up to the color itself, for ranges drawn as large areas, such as a LinearGauge's bands under a needle: the first is the lightest, the last the full color, with no black mixed in, so even the strongest stays the color. Tints mix toward the surface, so they follow the color scheme.

Diverging(Color low, Color high)

Two colors that meet at a neutral middle, for series on either side of one, such as answers from "Strongly disagree" to "Strongly agree": the first series is the strongest low, the last the strongest high, and with an odd count the middle one is gray.

Of(Color[] colors)

Your own colors, one per series in order; they repeat past the last, up to eight.

Orientation

enum

Whether items run across or down.

Orientation values
ValueDescription
Vertical

Top to bottom.

Horizontal

Side by side, wrapping when space runs out.

Connection lost

Rejoining the server…