Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Sparkline

Since 0.1.0-alpha.22
Puts a trend beside a number or in a table row, in the space of a word.

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

Properties (13)

RefreshTimeSpan?Added in 0.1.0-alpha.22

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.22

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

ValuesIEnumerable<double?>? requiredAdded in 0.1.0-alpha.22

The values, in order; null for one that's missing, which breaks the line.

Labelstring requiredAdded in 0.1.0-alpha.22

What it shows, such as "Signups, last 12 weeks": its accessible name, with a summary of the values. Required.

TypeSparklineType = SparklineType.LineAdded in 0.1.0-alpha.22

A line (the default), an area, bars, or win-loss bars (up or down from Threshold).

PointsSparklinePoints = SparklinePoints.LastAdded in 0.1.0-alpha.22

The values marked: a dot on a line or area; on bars, solid while the rest are lighter. The last (the current value) by default; combine with |, such as SparklinePoints.Low | SparklinePoints.High, or None. Win-loss bars mark none.

CurveChartCurve = ChartCurve.StraightAdded in 0.1.0-alpha.22

How a line or area runs from value to value: straight (the default), a smooth curve, or steps.

Mindouble?Added in 0.1.0-alpha.22

The bottom of the value range, in place of the lowest value (or zero, for bars). Give sparklines in a column the same Min and Max so their heights compare. A value past either is drawn at the edge.

Maxdouble?Added in 0.1.0-alpha.22

The top of the value range, in place of the highest value. See Min.

Thresholddouble = 0Added in 0.1.0-alpha.22

For win-loss bars: values over it go up, under it down. Defaults to 0.

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

How tall it is. Defaults to 2rem. It's as wide as its container.

Colorstring? (computed)Added in 0.1.0-alpha.22

A CSS color, such as var(--ib-color-success). Defaults to the theme's primary color.

ValueFormatstring?Added in 0.1.0-alpha.22

A .NET format string for the values in the summary, such as C0 or N1.

Events (1)

OnRefreshEventCallbackAdded in 0.1.0-alpha.22Interactive only

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

Types (4)

ChartCurve

enum

The shape of a line between its values.

ChartCurve values
ValueDescription
Straight

Straight from value to value.

Smooth

A smooth curve that never overshoots a value (monotone).

Step

Flat from each value to the next one's argument, where it steps: for values that hold until they change, such as a price or a plan's tier.

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.

SparklinePoints

enum

A sparkline's values marked with a dot (or, on bars, drawn solid while the rest are lighter). Combine them with |.

SparklinePoints values
ValueDescription
None

None marked.

First

The first value.

Last

The last value: the current one.

Low

The lowest value (the first, if it's tied).

High

The highest value (the first, if it's tied).

SparklineType

enum

How a Sparkline draws its values.

SparklineType values
ValueDescription
Line

A line through the values.

Area

A line with the space under it filled.

Bar

A bar for each value, up from zero (down, for a value under it).

WinLoss

A bar of one height for each value, up when it's over the sparkline's Threshold (0 by default) and down when it's under, with a tick for one at it: a run of wins and losses, gains and drops. Up in --ib-chart-increase, down in --ib-chart-decrease.

Connection lost

Rejoining the server…