Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Heatmap

Since 0.1.0-alpha.22
Shows where values run high or low across two dimensions, such as the busiest hours of the week.

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

Properties (26)

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.

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

The items, one cell each: each names its column, its row and its value.

ColumnExpression<Func<TItem, object?>> requiredAdded in 0.1.0-alpha.22

Each item's column, such as o => o.Hour: text, a number or a date. Columns keep the order the items first name them in. Dates a day or a week apart are named by month along the bottom.

RowExpression<Func<TItem, object?>> requiredAdded in 0.1.0-alpha.22

Each item's row, such as o => o.Day. Rows keep the order the items first name them in, the first at the top.

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

Each item's value, such as o => o.Orders: any number, or null for no data.

Titlestring?Added in 0.1.0-alpha.22

The chart's title, such as "Orders by hour", 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.22

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

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.

TitleAlignChartAlign = ChartAlign.StartAdded in 0.1.0-alpha.22

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

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.

ValueFormatstring?Added in 0.1.0-alpha.22

A .NET format string for the values, such as N0 or P0: in the cells, the legend, the tooltips and the table.

ColumnFormatstring?Added in 0.1.0-alpha.22

A .NET format string for the column names, such as htt for hours or MMM d for dates.

RowFormatstring?Added in 0.1.0-alpha.22

A .NET format string for the row names.

PaletteChartPalette?Added in 0.1.0-alpha.22

The colors: Shades of the primary color by default, light to dark for low to high; Shades of another color; Diverging for values above and below Midpoint, such as change from last year; or your own ramp with Of, one class per color. Colors (distinct colors, which say which, not how much) throws.

Stepsint = 5Added in 0.1.0-alpha.22

How many classes the values fall into, each a shade: 5 by default, 2 to 9. The classes are even steps between round bounds around the values (or from Min to Max). 0 blends the color continuously instead, with the legend a gradient: finer, but harder to read a value from.

Midpointdouble?Added in 0.1.0-alpha.22

The value a Diverging scale turns at, gray in the middle: 0 by default; a target or an average otherwise. The scale reaches as far on both sides, so colors of the same strength mean the same distance from it.

Mindouble?Added in 0.1.0-alpha.22

The scale's low end, so heatmaps side by side share a scale. Lower values take the first class.

Maxdouble?Added in 0.1.0-alpha.22

The scale's high end. Higher values take the last class.

LabelsChartLabels = ChartLabels.AutoAdded in 0.1.0-alpha.22

The values in the cells: with ChartLabels.Auto (the default) when every value fits its cell, coming and going with the width; ChartLabels.Inside always; ChartLabels.None never (the tooltip and "Show data" still give them).

CellHeightLength?Added in 0.1.0-alpha.22

Each row's height: 2rem by default. Shorter than a line, cells show no values and row names thin out.

LegendChartLegend = ChartLegend.AutoAdded in 0.1.0-alpha.22

Where the legend, the color scale, goes: above the grid by default (ChartLegend.Auto or ChartLegend.Top), ChartLegend.Bottom, or upright beside it with ChartLegend.Start or ChartLegend.End (above it under 30rem); ChartLegend.None leaves it out. With script, each class's key hides and shows the cells in it.

LegendAlignChartAlign?Added in 0.1.0-alpha.22

The legend's place along its edge: the start by default, the center or the end.

Tooltipbool?Added in 0.1.0-alpha.22

The tooltip for the cell under the pointer or the keyboard (with script), beside the cell. Unset, it shows only while the values aren't in the cells (when they don't fit, or with ChartLabels.None), and the arrow keys still move from cell to cell and say each one; true always; false never, with no keys either.

DataTableChartDataTable = ChartDataTable.PopoverAdded in 0.1.0-alpha.22

The values as a table, rows by columns: 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.22

HeatmapRanges, your own classes, and a HeatmapTooltip<T>.

Events (1)

OnRefreshEventCallbackAdded in 0.1.0-alpha.22Interactive only

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

Parts (2)

Components written inside HeatmapChart, documented here with it.

HeatmapRange

A class of values on a HeatmapChart<T>'s or CalendarHeatmap<T>'s scale, with its own color and name, in place of the chart's even steps: <HeatmapRange From="0" To="10" Color="Color.Of("#dbeafe")" Label="Quiet" />. A value is in the first range whose From it reaches and whose To it's under (the last range keeps its To). A value in no range is drawn as no data, with its value still in the cell, the tooltip and the table. Up to nine.

Fromdouble requiredAdded in 0.1.0-alpha.22

Where the range starts, on the chart's values.

Todouble requiredAdded in 0.1.0-alpha.22

Where it ends: values under it are in the range.

ColorColor? requiredAdded in 0.1.0-alpha.22

The cells' color, such as Color.Of("#dbeafe"). Order the ranges' colors light to dark (or dark to light in dark mode, with light-dark()). Values in cells take black or white by contrast-color(); in a browser without it, the stronger half of the ranges take white, so keep the light colors first.

Labelstring?Added in 0.1.0-alpha.22

What a value in the range means, such as "Quiet": the legend shows it with the range's bounds.

HeatmapTooltip<TItem>

A HeatmapChart<T>'s or CalendarHeatmap<T>'s tooltip content, in place of the cell's row, column and value: <HeatmapTooltip Context="c">@c.Row, @c.Column: @c.Text orders</HeatmapTooltip>. It's drawn on the server for each cell that has an item, so keep it to text and inline content (no buttons or links), and on a large grid (thousands of cells) leave the default, which the script writes and costs nothing on the page.

ChildContentRenderFragment<HeatmapCellContext<TItem>>? requiredAdded in 0.1.0-alpha.22

The tooltip's content for one cell.

Types (8)

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.

ChartLabels

enum

Where a series writes each value beside its bar or point.

ChartLabels values
ValueDescription
None

No labels.

Auto

Placed by type: past a bar's end, in the middle of a stacked segment, above a point. A label with no room there moves inside the bar or below the point, or is left out.

Inside

Inside the bar, at its end (in the middle of a stacked segment), or below a point.

Outside

Past the bar's end, or above a point, moving inside or below when there's no room.

ChartLegend

enum

Whether a chart has a legend, and where it goes.

ChartLegend values
ValueDescription
Auto

A Chart's legend above it, under the title, when there are two series or more (a single series is named by the chart's title); a PieChart's beside the circle when there's room, and below it otherwise.

Top

Above the chart, even for one series.

Bottom

Below the chart, even for one series.

Start

Beside the chart on the start side (the left, in a left-to-right page), in a column; below 30rem wide, above it instead.

End

Beside the chart on the end side (the right, in a left-to-right page), in a column; below 30rem wide, below it instead.

None

No legend.

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.

Color

struct

A color: one of the theme's tokens (so it follows light and dark mode), a custom token from your own theme, or a raw CSS color.

Color members
MemberDescription
Primary

Brand color.

OnPrimary

Text and icons on Primary.

Success

Success.

OnSuccess

Text and icons on Success.

Warning

Warning.

OnWarning

Text and icons on Warning.

Danger

Danger.

OnDanger

Text and icons on Danger.

Info

Informational.

OnInfo

Text and icons on Info.

Neutral

Neutral accent.

OnNeutral

Text and icons on Neutral.

Background

The page, behind the surfaces: a near-white in the default theme.

Surface

Cards, tables, fields and bars: white in light mode.

SurfaceSunken

An area set into a surface that holds surfaces of its own, such as a board's columns or a tray of cards: below Surface in both modes, so the cards on it lift. Like FillSubtle in light mode; below the page in dark mode.

FillSubtle

The quietest fill inside a surface, for large areas: a filled card, a panel, a band.

Fill

A fill inside a surface that must show at small sizes: table heads, code, wells.

FillStrong

The strongest fill: selected and pressed states, chips, tracks, skeletons.

SurfaceOverlay

Overlays that float above the page with no backdrop: menus, popovers, toasts. White like Surface in light mode, where a shadow sets it apart; a step lighter in dark mode.

OnSurface

Text on any surface.

Muted

Secondary text on any surface: descriptions, metadata.

Subtle

Tertiary text: captions, hints, placeholders. Still at least 4.5:1 on Surface and Fill.

Disabled

Text of disabled controls. Deliberately low contrast.

PrimaryText

Primary tuned for text and links on surfaces (at least 4.5:1).

SuccessText

Success tuned for text on surfaces (at least 4.5:1).

WarningText

Warning tuned for text on surfaces (at least 4.5:1).

DangerText

Danger tuned for text on surfaces (at least 4.5:1).

InfoText

Info tuned for text on surfaces (at least 4.5:1).

PrimarySoft

The accent's soft tint: soft buttons, the current page, chips. Text on it: PrimaryText.

SuccessSoft

Success's soft tint, behind a success message. Text on it: SuccessText.

WarningSoft

Warning's soft tint. Text on it: WarningText.

DangerSoft

Danger's soft tint. Text on it: DangerText.

InfoSoft

Info's soft tint. Text on it: InfoText.

Focus

The focus ring and field halo color: --ib-color-focus, the primary color unless the theme sets it.

Border

Borders and dividers. Decorative: too light to be the only edge of a control.

Outline

The edge of a control, such as an input or switch track: about 2:1 against Surface, darker than Border so an empty field reads as a box.

Transparent

Fully transparent.

CurrentColor

The current text color.

Token(string name)

A theme token by name, rendered as var(--ib-color-{name}). Use it for tokens your own theme adds.

Of(string css)

A raw CSS color such as #ff6600 or oklch(70% 0.1 250). Checked for unsafe characters.

Css string

The CSS value this color renders as.

TokenName string?

The theme token name, such as primary, or null for a raw color.

ContrastText Color?

The text color that pairs with this color used as a background: OnPrimary for Primary, OnSurface for the surfaces, on-{name} for a custom token (which falls back to the inherited color when the theme does not define it). null for raw colors and for colors that are already text colors.

HeatmapCellContext

class

What a HeatmapTooltip<T> draws from: one cell and its item.

HeatmapCellContext members
MemberDescription
Item TItem

The item drawn in the cell.

Index int

The item's place in the chart's Items, from 0.

Column string

The cell's column name, as the chart shows it.

Row string

The cell's row name.

Value double?

The value, or null for none.

Date DateOnly?

On a CalendarHeatmap<T>, the cell's day; null on a HeatmapChart.

Text string?

The value as text, formatted by the chart's ValueFormat, or null.

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.

Connection lost

Rejoining the server…