Sparkline
Since 0.1.0-alpha.22IzzyBlazor.Sparkline in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (13)
RefreshTimeSpan?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?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?>? requiredThe values, in order; null for one that's missing, which breaks the line.
Labelstring requiredWhat it shows, such as "Signups, last 12 weeks": its accessible name, with a summary of the values. Required.
TypeSparklineType = SparklineType.LineA line (the default), an area, bars, or win-loss bars (up or down from Threshold).
PointsSparklinePoints = SparklinePoints.LastThe 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.StraightHow a line or area runs from value to value: straight (the default), a smooth curve, or steps.
Mindouble?Thresholddouble = 0For win-loss bars: values over it go up, under it down. Defaults to 0.
HeightLength? (computed)How tall it is. Defaults to 2rem. It's as wide as its container.
Colorstring? (computed)A CSS color, such as var(--ib-color-success). Defaults to the theme's primary color.
ValueFormatstring?A .NET format string for the values in the summary, such as C0 or N1.
Plus 17 item props and 4 common props.
Show them hereEvents (1)
Types (4)
ChartCurve
enumThe shape of a line between its values.
| Value | Description |
|---|---|
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
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
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 |
Css string | The CSS value this length renders as. |
SparklinePoints
enumA sparkline's values marked with a dot (or, on bars, drawn solid while the rest are lighter). Combine them with |.
| Value | Description |
|---|---|
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
enumHow a Sparkline draws its values.
| Value | Description |
|---|---|
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 |