Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Linear gauge

Since 0.1.0-alpha.23
Shows one reading on a scale, such as a tank's level or the air pressure.

IzzyBlazor.LinearGauge in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly and its doc comments.

Properties (21)

PointerLinearGaugePointer = LinearGaugePointer.BarAdded in 0.1.0-alpha.23

How the value is drawn: LinearGaugePointer.Bar (the default), a bar beside the track from Min; LinearGaugePointer.Marker, a triangle at the value, for a reading that isn't an amount, such as air pressure; or LinearGaugePointer.Needle, a needle into a thick track, where the bands are the gauge.

TickPlacementTickPlacement = TickPlacement.OutsideAdded in 0.1.0-alpha.23

Where the ticks are drawn: TickPlacement.Outside the track (the default), or TickPlacement.Inside, over it, which thickens the track to hold them.

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

Which side the numbers are on: ScaleSide.Start, above across and left standing up, or ScaleSide.End, below across and right standing up. Defaults to below across, left standing up.

OrientationOrientation = Orientation.HorizontalAdded in 0.1.0-alpha.23

Orientation.Horizontal (the default) runs the scale across, the label above it; Orientation.Vertical stands it up, low at the bottom, like a thermometer.

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

Standing up, the scale's height. Defaults to 12rem.

Reversedbool = falseAdded in 0.1.0-alpha.23

Runs the scale the other way: from the right across, from the top standing up.

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

The step between numbered ticks, such as 20. Defaults to a round step that gives about five.

MinorStepdouble?Added in 0.1.0-alpha.23

The step between shorter ticks with no number, such as 5. None by default.

HideScalebool = falseAdded in 0.1.0-alpha.23

Leaves out the ticks and their numbers, for a gauge small enough for a table cell.

RefreshTimeSpan?Added in 0.1.0-alpha.23

How often the gauge 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 gauge 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 gauge 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 gauge with the same id.

Valuedouble requiredAdded in 0.1.0-alpha.23

The value. One outside Min and Max fills none or all of the scale, and still shows as it is.

Mindouble = 0Added in 0.1.0-alpha.23

The scale's start. Defaults to 0.

Maxdouble = 1Added in 0.1.0-alpha.23

The scale's end. Defaults to 1, for a share shown with ValueFormat="P0".

Labelstring requiredAdded in 0.1.0-alpha.23

What it measures, such as "Disk used": written with the value, and its accessible name. Required.

HideLabelbool = falseAdded in 0.1.0-alpha.23

Hides the label, which still names the gauge for screen readers.

ValueFormatstring?Added in 0.1.0-alpha.23

A .NET format string for the value, the scale's numbers, the target and the pointers, such as P0, N0 or 0 mb.

Targetdouble?Added in 0.1.0-alpha.23

A goal to read the value against, such as 0.8: a tick across the track, read with the value.

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

The value's color, such as Accent.Of("#0d9488"). Defaults to the color of the GaugeBand the value is in, or the primary color.

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

The bands' colors, in the order they're written, such as ChartPalette.Of(Color.Warning, Color.Danger), or ChartPalette.Tints(Color.Warning) for a light tint up to the full color (for a thick track's bands). Defaults to grays, darkest first, which mark the ranges without saying good or bad; a value in a gray band keeps Accent or the primary color. A band's own Accent takes the place of its palette color.

ChildContentRenderFragment?Added in 0.1.0-alpha.23

The GaugeBands, ranges along the scale such as where a load turns high, and GaugePointers, more values on the same 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 (2)

Components written inside LinearGauge, 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.

GaugePointer

Another value on a Gauge or LinearGauge, on the same scale, such as the dew point beside the temperature: <GaugePointer Value="12" Label="Dew point" />. It's drawn as a mark (a notch across a dial, a triangle on a linear scale) in the next of the chart colors, and written under the gauge with its label: "Dew point 12°". The gauge's own Value stays the one that fills.

Valuedouble requiredAdded in 0.1.0-alpha.23

The value, on the gauge's scale and in its format.

Labelstring requiredAdded in 0.1.0-alpha.23

What the value is, such as "Dew point": written beside it, and its accessible name. Required.

AccentAccent?Added in 0.1.0-alpha.23

The mark's color, such as Accent.Of("#0d9488"), in place of the next chart color.

Types (7)

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.

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.

Length

struct

A width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.

Length members
MemberDescription
Sm

640px (matches the sm breakpoint).

Md

768px (matches the md breakpoint).

Lg

1024px (matches the lg breakpoint).

Xl

1280px (matches the xl breakpoint).

Prose

A comfortable reading width, 68 characters.

Full

100% of the containing block.

Auto

auto.

FitContent

fit-content: as wide as the content, up to the available space.

MinContent

min-content.

MaxContent

max-content.

Px(double value)

Pixels.

Rem(double value)

Root ems (16px each by default).

Percent(double value)

Percent of the containing block.

Ch(double value)

Character widths, for text measures.

Vw(double value)

Percent of the viewport width.

Dvh(double value)

Percent of the dynamic viewport height (accounts for mobile browser bars).

Of(string css)

Any CSS length, such as calc(100% - 2rem). Checked for unsafe characters.

Css string

The CSS value this length renders as.

LinearGaugePointer

enum

How a LinearGauge draws its value.

LinearGaugePointer values
ValueDescription
Bar

A bar beside the track, from the scale's start to the value: an amount, such as a tank's level.

Marker

A triangle at the value: a reading that isn't an amount, such as air pressure.

Needle

A needle at the value, into a thick track: the bands are the gauge, such as where a share of calories falls.

Orientation

enum

Whether items run across or down.

Orientation values
ValueDescription
Vertical

Top to bottom.

Horizontal

Side by side, wrapping when space runs out.

ScaleSide

enum

Which side of a scale its numbers are on, such as a LinearGauge's.

ScaleSide values
ValueDescription
Start

Above a scale across, left of one standing up.

End

Below a scale across, right of one standing up.

TickPlacement

enum

Where a scale's ticks are drawn, such as a LinearGauge's.

TickPlacement values
ValueDescription
Outside

Beside the track, with their numbers.

Inside

Over the track, from the edge the numbers are on.

Connection lost

Rejoining the server…