Funnel chart
Since 0.1.0-alpha.22IzzyBlazor.FunnelChart<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (20)
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.
ChildContentRenderFragment?ChartDrillLevel<T>s, from the top, for stages that drill down: each level's groups are the stages (the level's argument in place of Argument), their values added up by Aggregate, and selecting one shows the next level.
Drillstring?With drill-down levels: the page address's query value that holds the level ("drill" by default; give each chart that drills on a page its own).
HideBreadcrumbbool = falseWith drill-down levels: leaves out the breadcrumb above the chart.
AggregateDataAggregate = DataAggregate.SumWith drill-down levels, how each stage adds up its items' values: Sum by default, or Avg, Min, Max or Count.
ItemsIEnumerable<TItem>? requiredThe items, one stage each, in the order of the process.
ArgumentExpression<Func<TItem, object?>>?Each stage's name, such as s => s.Stage.
ValueExpression<Func<TItem, object?>> requiredEach stage's value, such as s => s.People: any number. A funnel stage's top is as wide as its share of the largest; a pyramid level is as tall as its share of the total.
Titlestring?The chart's title, such as "Sign-ups, October", shown above it as its caption. It also names the chart for screen readers. A chart needs a Title or TitledBy.
HideTitlebool = falseHides the title, which still names the chart for screen readers.
Downloadbool = falseShows 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.StartWhere the title sits: at the start by default (the left, in a left-to-right page); ChartAlign.Center or ChartAlign.End.
TitledBystring?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?A .NET format string for the values, such as C0 or N0.
PaletteChartPalette?Pyramidbool = falseDraws a pyramid: a triangle on its base, the first item at the bottom, each level as tall as its share of the total, for levels of a hierarchy such as a team's seniority. Each shows its share of the total in place of the first's and the one before's.
LabelsChartLabels = ChartLabels.AutoWhere the labels go: beside the shape, joined to their stages by lines, by default (Auto or ChartLabels.Outside); ChartLabels.Inside writes each in its stage (its share over its name), where it fits, and puts the rest beside the shape. ChartLabels.None leaves them out: the shape's hover text and "Show data" still give every value.
LabelTemplateRenderFragment<FunnelLabelContext<TItem>>?Writes each label yourself, from the stage's name, value and shares: inside its stage or beside the shape (Inside says which). Screen readers still hear the stage's name, value and shares.
DataTableChartDataTable = ChartDataTable.PopoverThe 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.
Plus 17 item props and 4 common props.
Show them hereEvents (1)
Types (6)
ChartAlign
enumWhere 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.
| Value | Description |
|---|---|
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
enumHow a chart offers its values as a table.
| Value | Description |
|---|---|
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
enumWhere a series writes each value beside its bar or point.
| Value | Description |
|---|---|
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. |
ChartPalette
classThe 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.
| Member | Description |
|---|---|
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 ( |
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 |
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 |
Of(Color[] colors) | Your own colors, one per series in order; they repeat past the last, up to eight. |
DataAggregate
enumWhat a DataGrid column works out over a group of rows, or over all of them.
| Value | Description |
|---|---|
Sum | The values added up. For numbers. |
Avg | The mean of the values. For numbers. |
Min | The lowest value. For numbers, dates, times and text. |
Max | The highest value. For numbers, dates, times and text. |
Count | How many rows. |
Custom | The field's own |
FunnelLabelContext
classWhat a FunnelChart's LabelTemplate draws from: one stage, with its value and shares written as the chart writes them.
| Member | Description |
|---|---|
Item TItem | The item. |
Index int | The item's place in the chart's |
Name string | The stage's name, from |
Value double? | The stage's value, or null when it has none. |
ValueText string? | The value written with the chart's |
Share string? | The stage's share of the first, such as "64%"; a pyramid level's, of the total. |
ShareOfPrevious string? | The stage's share of the stage before it, such as "71%". Null for the first stage and in a pyramid. |
Inside bool | Whether the label is drawn in its stage, or beside the shape because it doesn't fit there. |