Klyroo.Dashboard API reference
Every public type and member, generated from the compiled assemblies and their XML documentation.
On this page
- Klyroo.
Dashboard. Core - Static classes and extensions
- Dashboard
Format - Dashboard
Table Column - Classes
- Dashboard
Controller - Dashboard
Filter Control - Dashboard
Resource <TData> - Dashboard
Table Column <TRow> - Dashboard
View Meta - Records
- Dashboard
Alert Item - Dashboard
Bar Item - Dashboard
Chart Selection - Dashboard
Chart Series - Dashboard
Data Column - Dashboard
Data Table - Dashboard
Details Item - Dashboard
Feed Item - Dashboard
Filter Preset - Dashboard
List Item - Dashboard
Option - Dashboard
Relative Time Texts - Dashboard
Stats Item - Dashboard
Status - Dashboard
Table Sort - Interfaces
- IDashboard
Persistent Source - IDashboard
Source - Enums
- Dashboard
Alert Order - Dashboard
Alert Severity - Dashboard
Bars Emphasis - Dashboard
Bars Variant - Dashboard
Block Phase - Dashboard
Chart Series Type - Dashboard
Chart Totals - Dashboard
Chart Type - Dashboard
Compare Mode - Dashboard
Comparison Mode - Dashboard
Filter Kind - Dashboard
Format Preset - Dashboard
Gauge Variant - Dashboard
Grid Variant - Dashboard
Query Stage - Dashboard
Resource State - Dashboard
Skeleton Kind - Dashboard
Stats Variant - Dashboard
Table Column Kind - Klyroo.
Dashboard - Components
- Kly
Dashboard Alerts - Kly
Dashboard Bars - Kly
Dashboard Card - Kly
Dashboard Chart - Kly
Dashboard Details - Kly
Dashboard Feed - Kly
Dashboard Gauge - Kly
Dashboard Grid - Kly
Dashboard List - Kly
Dashboard Page - Kly
Dashboard Stat - Kly
Dashboard Stats - Kly
Dashboard Table <TRow> - Static classes and extensions
- Dashboard
Locales - Klyroo
Dashboard Service Collection Extensions - Classes
- Dashboard
Persistence - Klyroo
Dashboard Options - Records
- Dashboard
Texts
Klyroo.Dashboard.Core
Static classes and extensions (2) · Classes (5) · Records (15) · Interfaces (2) · Enums (19)
Static classes and extensions
DashboardFormat
Klyroo. · service
Number, delta, relative-time, comparison-range and CSV helpers. Numbers use the invariant culture unless you pass one; the components pass the format culture of Klyroo.UI.
| Field | Type | Description |
|---|---|---|
const Missing |
string |
The placeholder shown for a missing, NaN or infinite number: an em dash. |
| Method | Returns | Description |
|---|---|---|
static ExportCsv |
string |
Serializes a table to CSV. The text starts with a UTF-8 byte order mark, uses ; as delimiter when the culture has a comma as decimal separator and , otherwise, and ends every line, the header included, with \. Headers and text cells are quoted. A cell of a numeric column that reads as a number is written bare, with a decimal comma instead of the invariant point when the delimiter is ;, unless it contains the delimiter, a quote or a line break, in which case it is quoted too. Any other cell that starts with =, +, -, @, a tab or a carriage return gets a leading apostrophe, so that a spreadsheet does not run it as a formula. |
static Format |
string |
Formats a number with a preset. A null, NaN or infinite value gives DashboardFormat.. |
static Format |
string |
Formats a number with the K, M and B suffixes and at most one decimal. The suffix is chosen after rounding, so 999,999 gives 1M, not 1000K. |
static Format |
string |
Formats an amount with the currency symbol in front and at most two decimals. The symbol position does not follow the culture. |
static Format |
string? |
Writes a number as the cells of a Dashboard carry it: in the invariant culture, without grouping and with every significant digit (12600, -4.25), so that it keeps full precision. DashboardFormat. writes it with a decimal comma for the cultures that use one. |
static Format |
string |
Describes how long ago something happened: just now under 45 seconds, then minutes, hours, yesterday, days under a week, and an ISO date (yyyy-MM-dd) beyond that. The text is English: pass Dashboard to the overload for another language. |
static Format |
string |
Describes how long ago something happened like DashboardFormat., with the wording of texts. Past a week the text is still an ISO date. |
static Resolve |
(Date |
Computes the comparison range of a date range. Dashboard gives the range of the same number of days that ends the day before the start. Dashboard shifts both bounds back one year, clamping February 29. |
static Resolve |
string |
Turns a title into a file name: lowercase, accents removed, anything that is not a letter or digit collapsed into one hyphen. Falls back to dashboard when nothing is left. |
DashboardTableColumn
Klyroo. · service
Creates the columns of KlyDashboard. The column reads its value from the row with a delegate, so nothing is looked up by name and a wrong type does not compile.
| Method | Returns | Description |
|---|---|---|
static For |
Dashboard |
Creates a column that shows value of each row. |
Classes
DashboardController
Klyroo. · class
Central controller for an analytical dashboard: coordinates filters, views, staged resources (Dashboard, Dashboard, Dashboard) and refresh. It has no UI dependency. Dispose it with the page that owns it: that stops Dashboard and cancels the loads in progress.
| Constructor | Description |
|---|---|
Dashboard |
Creates a controller. |
| Field | Type | Description |
|---|---|---|
const Max |
int |
The largest Dashboard interval, one day in seconds. |
| Property | Type | Description |
|---|---|---|
AutoRefresh (get, set) |
int |
Seconds between two automatic calls to Dashboard, or 0 (the default) for none. A positive value starts a timer and 0 or a negative value stops it. A tick waits for the refresh it started to finish, so refreshes started by the timer never overlap. The timer resumes on the synchronization context that set the value, if any, and stops when the controller is disposed. Setting it on a disposed controller does nothing. A refresh that throws does not stop the timer. |
Controls |
IReadOnlyList |
The filters, in the order they were added. |
CurrentView (get, set) |
string? |
The key of the view being shown. Setting a key that is unknown or disabled is ignored. Setting a valid key marks the view as opened and raises Changed. The first enabled view added becomes current, and when the current view is disabled the next enabled one takes its place. |
Filtered |
bool |
true when at least one filter differs from its default values. |
Key |
string |
Identifier of the dashboard. |
Refreshing |
bool |
true while any resource is loading or refreshing. |
Resources |
IReadOnlyList |
The registered resources, in the order they were registered. |
State |
Dashboard |
The combined state of the Dashboard resources, computed by Dashboard. Background and deferred resources are ignored. |
UpdatedAt |
DateTimeOffset? |
The oldest IDashboard among the resources that have one, or null when none has loaded. |
Views |
IReadOnlyList |
The enabled views, in the order they were added. A new list is built on every call. |
| Method | Returns | Description |
|---|---|---|
AddFilter |
Dashboard |
Adds a filter and forwards its changes, including changes of Dashboard and Dashboard, to Changed. |
AddView |
Dashboard |
Adds a view tab. The first enabled view added becomes the current one. Later changes of its Badge and Enabled raise Changed. |
ApplyQuery |
bool |
Sets the filters from a URL query string, the inverse of Dashboard. The query describes every filter that is not headless and enabled: one that is not in it returns to its default values, so applying the query of a URL always gives the state of that URL. A value that does not fit its filter (a number that is not a number, a date that is not yyyy-MM-dd, a Dashboard that is not true or false, a Dashboard that is not a Dashboard name, a text longer than 512 characters, an option that is not among the loaded Dashboard of an Dashboard or Dashboard filter) is ignored, so a hand-edited URL cannot put an unexpected value in a filter. A disabled filter ignores changes, so the controller remembers what the query gave it and applies it when the filter is enabled, if no later ApplyQuery took it out of the URL in the meantime. A filter is only touched when its selection changes, so nothing is raised for a query that matches the current state, and applying the same query twice is the same as once. The method does not reload any resource: call Dashboard or Dashboard afterwards, or let the subscribers of ChangedEvent do it. It uses no reflection. |
static Combine |
Dashboard |
Combines several states into one. Disabled states are ignored. No state gives Dashboard, only disabled states give Dashboard, then any error wins, then any loading, then all idle gives Dashboard, otherwise Dashboard. |
Dispose() |
void |
Stops the Dashboard timer and disposes the registered resources that are disposable, which cancels their loads. Later calls to Dashboard do nothing. |
Filter |
string |
A text that changes when a filter value changes: the keys and values of the filters. Dashboard stores it with the handed-over data and refuses the data when the next render starts from other filter values. |
LoadAsync() |
Task |
The first load of a page: like Dashboard, except that a resource whose data was handed over by an earlier render (IDashboard) keeps it instead of loading again. Call it once where the page loads its data, and Dashboard for every later reload. Without restored data, it is the same as Dashboard. |
MergeQuery |
string |
Replaces the filters of this controller in an existing query string with Dashboard and keeps every other pair as it was, so a page can write its filters into a URL that also carries a search term or a page number. Headless filters are not the controller's: a pair with the key of one is kept. A disabled filter keeps its pair too, so its value is still in the URL when the filter is enabled again. |
QueryMatches |
bool |
Tells whether the filters in a query string already say what Dashboard would write: the pairs with the keys of this controller are compared decoded, ignoring their order among the keys and how they are encoded, and the other pairs are ignored. A page uses it to leave a URL alone when only the spelling of the query differs from the one it would write. |
RefreshAsync() |
Task |
Loads all Dashboard resources in parallel, waits for them, then loads the Dashboard resources and the already active Dashboard ones in parallel. A resource still loading from an earlier call is cancelled and loaded again. After Dashboard it does nothing. |
RegisterResource |
Dashboard |
Registers a resource so that Dashboard loads it, its changes are forwarded to Changed and Dashboard disposes it. |
ResetFilters() |
void |
Restores the default values of every enabled filter that is not headless. |
ToQuery |
string |
Writes the filters that differ from their default values as a URL query string, without the leading ?: region=EMEA®ion=APAC&period=2026-01-01&period=2026-01-31. Each value is its own key=value pair, in the order of the filters and of their values, and every key and value is percent-encoded, so the same filters always give the same text. Filters at their default values, disabled filters and Dashboard filters are left out; a filter whose selection was cleared is written as key=. The method changes nothing, uses no reflection and no clock. |
DashboardFilterControl
Klyroo. · class
Interactive filter control state managed by Dashboard.
| Constructor | Description |
|---|---|
Dashboard |
Creates a filter control. |
| Property | Type | Description |
|---|---|---|
static Boolean |
IReadOnlyList |
The options a Dashboard filter gets when it is created without items: true (Yes) and false (No). |
Changed |
bool |
true when the filter is enabled, not headless and its selection differs from the default values (same values in the same order). |
static Comparison |
IReadOnlyList |
The options a Dashboard filter gets when it is created without items: none, previous and year, the names of the Dashboard members in lowercase. |
Display |
string |
The text of the filter pill: the placeholder when nothing is selected, start – end for a Dashboard (with … for an open bound), the labels joined by commas for one or two values, otherwise the first label followed by the number of others (for example EMEA +2). |
Enabled (get, set) |
bool |
When false the filter is hidden, ignores changes and reports its default values. Changing it closes the option menu and raises ChangedEvent when the reported values change; the controller's Changed is raised either way, so the page renders again. |
FilteredItems |
IReadOnlyList |
The options whose label contains Dashboard, ignoring case; all options when the search is blank. |
Headless |
bool |
Whether the filter is driven by code: hidden from the toolbar and ignored by Dashboard and by Dashboard. |
Items (get, set) |
IReadOnlyList |
The selectable options. Replace the list to update the options, for example after loading them; the controller's Changed is raised so the page renders again. null is stored as an empty list. |
Key |
string |
Identifier of the filter. |
Kind |
Dashboard |
What the control selects. The toolbar of KlyDashboardPage draws a text box for Dashboard, a number box for Dashboard, a date picker for Dashboard, two for Dashboard, your CustomFilter template for Dashboard, and the option list for the other kinds. |
Label |
string |
Text shown on the filter pill. |
Max |
int? |
The maximum number of selected values in multiple mode, or null for no limit. |
Multiple |
bool |
Whether several values can be selected. |
Open (get, set) |
bool |
Whether the option menu is open in the toolbar. |
Placeholder |
string |
Text shown when nothing is selected. |
Presets |
IReadOnlyList |
Shortcuts that select a set of values in one click. |
Search (get, set) |
string |
The text typed in the search box. Filters Dashboard. |
Searchable |
bool |
Whether the option list shows a search box. |
Value (get, set) |
string? |
The first selected value. Setting it replaces the selection with that value; null or an empty string restores the default values. Ignored when Dashboard is false. |
Values |
IReadOnlyList |
The selected values, or the default values when Dashboard is false. |
| Method | Returns | Description |
|---|---|---|
ApplyPreset |
void |
Replaces the selection with the values of a preset, normalized as by Dashboard: one value in single mode, two for a Dashboard, at most Dashboard in multiple mode. |
IsSelected |
bool |
Whether value is selected. |
Reset() |
void |
Restores the default values. |
SetValues |
void |
Replaces the selection and raises ChangedEvent. In single mode only the first value is kept, except for a Dashboard, which keeps the first two (start and end). In multiple mode duplicates are dropped and at most Dashboard values are kept. A list whose values are all empty clears the selection. Ignored when Dashboard is false. |
Toggle |
void |
Selects or deselects a value. In single mode the value replaces the selection and the menu closes; it cannot be deselected. In multiple mode the value is added unless Dashboard is reached, or removed if already selected. ChangedEvent is raised even when nothing changed. |
DashboardResource<TData>
Klyroo. · class
A staged, optionally gated asynchronous data resource managed by a Dashboard.
| Constructor | Description |
|---|---|
Dashboard |
Creates a resource. |
| Property | Type | Description |
|---|---|---|
Active |
bool |
true once the resource has been activated, loaded or fed with Dashboard. |
Data |
TData |
The current data. After a failed load it keeps the last successful value. |
DefaultValue |
TData |
The data used before the first load, when disabled, and when the requires gate is closed. |
Error |
string? |
The message of the last failure, or null. |
Fetching |
bool |
true while the loader is running. |
Key |
string |
Identifier of the resource. |
Refreshing |
bool |
true while data that was already loaded is being reloaded. |
Restored |
bool |
true while the data is the one IDashboard took back: Dashboard keeps it instead of loading again. Any load, SetData, SetError or closed gate clears it. |
Stage |
Dashboard |
The stage in which the controller loads the resource. |
State |
Dashboard |
The lifecycle state of the resource. |
UpdatedAt |
DateTimeOffset? |
When data was last set or loaded successfully (UTC). |
| Method | Returns | Description |
|---|---|---|
ActivateAsync() |
Task |
Marks the resource active and loads it when its state is Dashboard, or Dashboard with an enabled predicate that now returns true. A resource that is still disabled stays Dashboard with its default value, and Changed is only raised when it was not disabled before. |
Dispose() |
void |
Cancels the load in progress and makes later calls to Dashboard and Dashboard do nothing. The state and the data are left as they are. Dashboard disposes the resources registered with it. |
ExportJson() |
string? |
The loaded data as JSON text, or null when there is nothing to hand over: no JsonTypeInfo, no successful load yet, or a load still running. |
RefreshAsync() |
Task |
Runs the loader. A disabled resource goes to Dashboard. An unmet requires gate resets the data to the default value without calling the loader. Otherwise the state is Dashboard on the first load, or stays Dashboard with Dashboard set on later ones. An exception from the loader is caught and stored in Dashboard. |
RestoreJson |
bool |
Takes data written by IDashboard as if it had been loaded at updatedAt, and sets IDashboard. Returns false and changes nothing when the source cannot take it: no JsonTypeInfo, a load already started, a disabled or disposed source, a closed requires gate, or text that does not read as the data type. |
SetData |
void |
Sets the resource data directly and transitions to Dashboard. A load in progress is cancelled and its result ignored. |
SetError |
void |
Transitions the resource to Dashboard. A load in progress is cancelled and its result ignored. |
DashboardTableColumn<TRow>
Klyroo. · class
A column of KlyDashboard. Create one with `DashboardTableColumn.For``.
| Property | Type | Description |
|---|---|---|
Format |
Dashboard |
The number format of Dashboard and Dashboard cells. |
InvertDelta |
bool |
Whether a negative Dashboard is shown as good news. |
Key |
string |
The key of the column: the sort key, and the column of the table view and of the CSV export. |
Kind |
Dashboard |
How the column shows and sorts its values. |
Label |
string |
The column header. |
Sortable |
bool |
Whether the header is a sort button. |
DashboardViewMeta
Klyroo. · class
Metadata for a named dashboard view tab.
| Property | Type | Description |
|---|---|---|
Badge (get, set) |
string? |
Small text shown next to the label, such as a count. Hidden when empty or 0. Setting it raises the controller's Changed, so the page renders again. |
Enabled (get, set) |
bool |
Disabled views are left out of Dashboard and cannot become current. Disabling the current view makes the next enabled view current (wrapping to the first), and enabling a view when none is current makes the first enabled view current. Setting it raises the controller's Changed. |
Key (init) |
string |
Identifier of the view, the value of Dashboard when it is shown. |
Label (init) |
string |
Text of the view tab. |
Opened (get, set) |
bool |
true once the view has been current. Use it to render the content of a tab only after the first visit. |
Records
DashboardAlertItem
Klyroo. · record
One alert row in KlyDashboard.
| Constructor | Description |
|---|---|
Dashboard |
One alert row in KlyDashboard. |
| Property | Type | Description |
|---|---|---|
ActionHref (init) |
string? |
The target of the action link. |
ActionLabel (init) |
string? |
The text of the action on the right: a link when ActionHref is set, a button when KlyDashboard has a handler, otherwise nothing is rendered. |
Description (init) |
string? |
A line of text under the label. |
Label (init) |
string |
The title of the alert. |
Severity (init) |
Dashboard |
The severity, which sets the badge and the order. |
Value (init) |
string? |
A short value on the right, such as a count. |
DashboardBarItem
Klyroo. · record
One horizontal bar entry in KlyDashboardBars.
| Constructor | Description |
|---|---|
DashboardBarItem |
One horizontal bar entry in KlyDashboardBars. |
| Property | Type | Description |
|---|---|---|
Label (init) |
string |
The name of the bar. |
Meta (init) |
string? |
A text shown instead of the formatted value. |
Selected (init) |
bool |
Marks the row as selected (data-selected). |
Tag (init) |
string? |
A small monospaced tag next to the label. |
Value (init) |
double |
The value that sets the bar length. |
DashboardChartSelection
Klyroo. · record
The data point a user selected in a KlyDashboard, as OnSelect receives it.
| Constructor | Description |
|---|---|
Dashboard |
The data point a user selected in a KlyDashboard, as OnSelect receives it. |
| Property | Type | Description |
|---|---|---|
Category (init) |
string |
The category (the label of the slice for a donut). |
Series (init) |
string |
The Dashboard of the series. |
Value (init) |
double |
The value of the series in the category, as given to the chart. |
DashboardChartSeries
Klyroo. · record
One series definition for KlyDashboard.
| Constructor | Description |
|---|---|
Dashboard |
One series definition for KlyDashboard. |
| Property | Type | Description |
|---|---|---|
IsComparison (init) |
bool |
Marks a comparison series: drawn in a muted color (dashed when it is a line), dashed in the legend, and left out of the totals and of a donut. |
Key (init) |
string |
Identifier of the series, used as the column key in the table view and in the CSV export. |
Label (init) |
string |
The name in the legend. |
Type (init) |
Dashboard |
How the series is drawn. In a chart whose type is Dashboard, a Dashboard series is drawn as a line over the bars. A Dashboard chart draws every series as a line and a Dashboard chart draws the first series that is not a comparison, so this value only matters in bar charts. |
Values (init) |
IReadOnlyList |
One value per category. |
DashboardDataColumn
Klyroo. · record
Tabular view and CSV export representation of a dashboard block.
| Constructor | Description |
|---|---|
Dashboard |
Tabular view and CSV export representation of a dashboard block. |
| Property | Type | Description |
|---|---|---|
Key (init) |
string |
The key of the cell in each row. |
Label (init) |
string |
The column header. |
Numeric (init) |
bool |
Whether cells hold numbers: right-aligned in the table view, and written unquoted by the CSV export when they read as a number. The ready-made blocks write them with DashboardFormat.. |
DashboardDataTable
Klyroo. · record
Tabular representation of a dashboard block used by "View as table" and "Download CSV".
| Constructor | Description |
|---|---|
Dashboard |
Tabular representation of a dashboard block used by "View as table" and "Download CSV". |
| Property | Type | Description |
|---|---|---|
Columns (init) |
IReadOnlyList |
The columns, in display order. |
Rows (init) |
IReadOnlyList |
The rows: the text of each cell by column key, null for an empty cell. The ready-made blocks put raw invariant-culture numbers in numeric columns (12600, not 12.6K) and the rows they show, after their Limit. |
DashboardDetailsItem
Klyroo. · record
One definition row inside KlyDashboard.
| Constructor | Description |
|---|---|
Dashboard |
One definition row inside KlyDashboard. |
| Property | Type | Description |
|---|---|---|
Copy (init) |
bool |
Whether a button after the value copies it to the clipboard. It needs an interactive render mode. |
FullSpan (init) |
bool |
Whether the row spans both columns on wide screens. |
Hidden (init) |
bool |
Whether the row is left out. |
Hint (init) |
string? |
A line of help text under the value. |
Href (init) |
string? |
When set, the value is a link. |
Key (init) |
string |
Identifier of the row. |
Label (init) |
string |
The term. |
Mono (init) |
bool |
Whether the value uses a monospaced font. |
Value (init) |
string? |
The text of the definition. An empty value is shown as the missing-value placeholder. |
DashboardFeedItem
Klyroo. · record
One timeline activity event in KlyDashboardFeed.
| Constructor | Description |
|---|---|
Dashboard |
One timeline activity event in KlyDashboardFeed. |
| Property | Type | Description |
|---|---|---|
AvatarText (init) |
string? |
Short text in a circle, such as initials. |
Description (init) |
string? |
A line of text under the label. |
Label (init) |
string |
What happened. |
Time (init) |
DateTimeOffset |
When it happened. |
DashboardFilterPreset
Klyroo. · record
A preset value in a Dashboard.
| Constructor | Description |
|---|---|
Dashboard |
A preset value in a Dashboard. |
| Property | Type | Description |
|---|---|---|
Icon (init) |
string? |
The name of a Klyroo.UI icon shown before the label of the preset button in the toolbar. |
Label (init) |
string |
The text of the preset button. |
Values (init) |
IReadOnlyList |
The values selected when the preset is applied, normalized as by Dashboard. |
DashboardListItem
Klyroo. · record
One ranked row in KlyDashboardList.
| Constructor | Description |
|---|---|
Dashboard |
One ranked row in KlyDashboardList. |
| Property | Type | Description |
|---|---|---|
Delta (init) |
double? |
A percent change, green when zero or positive and red when negative. |
Description (init) |
string? |
A line of text under the label. |
Href (init) |
string? |
When set, the label is a link. |
Label (init) |
string |
The name of the row. |
LeadingText (init) |
string? |
Short text in a circle before the label, such as initials or a rank. |
Percent (init) |
double? |
A percentage shown before the value. |
Selected (init) |
bool |
Marks the row as selected (data-selected). |
Value (init) |
double? |
The value, formatted with the list Format. |
DashboardOption
Klyroo. · record
An option item in a Dashboard.
| Constructor | Description |
|---|---|
DashboardOption |
An option item in a Dashboard. |
| Property | Type | Description |
|---|---|---|
Description (init) |
string? |
A secondary line under the label in the option menu of the toolbar. |
Disabled (init) |
bool |
Whether the option cannot be selected. |
Icon (init) |
string? |
The name of a Klyroo.UI icon (for example globe or i-lucide-globe) shown before the label in the option menu of the toolbar. |
Label (init) |
string |
The text shown to the user. |
Value (init) |
string |
The value stored in the selection. |
DashboardRelativeTimeTexts
Klyroo. · record
The words DashboardFormat. uses. A new instance holds the English words.
| Property | Type | Description |
|---|---|---|
DaysAgo (init) |
Func |
A moment less than a week ago, given the number of days. |
static English |
Dashboard |
The English words, the ones DashboardFormat. uses. |
HoursAgo (init) |
Func |
A moment less than 22 hours ago, given the number of hours (at least 1). |
JustNow (init) |
string |
A moment under 45 seconds ago. |
MinutesAgo (init) |
Func |
A moment less than 45 minutes ago, given the number of minutes (at least 1). |
Yesterday (init) |
string |
A moment about a day ago. |
DashboardStatsItem
Klyroo. · record
One metric entry inside KlyDashboard.
| Constructor | Description |
|---|---|
Dashboard |
One metric entry inside KlyDashboard. |
| Property | Type | Description |
|---|---|---|
Caption (init) |
string? |
A line of text under the value. |
Delta (init) |
double? |
The change in percent, shown next to the value. |
Format (init) |
Dashboard |
How the value is formatted. |
InvertDelta (init) |
bool |
When set, a negative delta is shown as good news (for churn or cost). |
Key (init) |
string |
Identifier of the metric. |
Label (init) |
string |
The metric name. |
Progress (init) |
double? |
A progress bar from 0 to 100. |
Status (init) |
DashboardStatus? |
A status pill. |
Value (init) |
double? |
The value, or null to show a dash. |
DashboardStatus
Klyroo. · record
Status pill shown on a KlyDashboardStat or Dashboard.
| Constructor | Description |
|---|---|
DashboardStatus |
Status pill shown on a KlyDashboardStat or Dashboard. |
| Property | Type | Description |
|---|---|---|
Color (init) |
string? |
A semantic color name such as success, warning, error, info or primary; neutral when null. It must not be empty. |
Label (init) |
string |
The text of the pill. |
DashboardTableSort
Klyroo. · record
Active sort state of KlyDashboard.
| Constructor | Description |
|---|---|
Dashboard |
Active sort state of KlyDashboard. |
| Property | Type | Description |
|---|---|---|
Descending (init) |
bool |
Whether the order is descending. |
Key (init) |
string |
The key of the sorted column. |
Interfaces
IDashboardPersistentSource
Klyroo. · interface
A source whose loaded data can be written as JSON text and read back, so that a render hands it to the next one instead of loading it again: the prerender of a Blazor page to its interactive render, for example. The text is written with a JsonTypeInfo the app gives, never by reflection, so it works with trimming and NativeAOT.
| Property | Type | Description |
|---|---|---|
Restored |
bool |
true while the data is the one IDashboard took back: Dashboard keeps it instead of loading again. Any load, SetData, SetError or closed gate clears it. |
| Method | Returns | Description |
|---|---|---|
ExportJson() |
string? |
The loaded data as JSON text, or null when there is nothing to hand over: no JsonTypeInfo, no successful load yet, or a load still running. |
RestoreJson |
bool |
Takes data written by IDashboard as if it had been loaded at updatedAt, and sets IDashboard. Returns false and changes nothing when the source cannot take it: no JsonTypeInfo, a load already started, a disabled or disposed source, a closed requires gate, or text that does not read as the data type. |
IDashboardSource
Klyroo. · interface
Common interface implemented by dashboard queries and derived resources.
| Property | Type | Description |
|---|---|---|
Active |
bool |
true once the source has been activated or loaded. Deferred sources are refreshed by the controller only when active. |
Error |
string? |
The message of the last failure, or null when the last load succeeded. |
Fetching |
bool |
true while any load is running, first load or refresh. |
Key |
string |
Identifier of the source, unique within a controller by convention. |
Refreshing |
bool |
true while data that was already loaded is being reloaded. The old data stays visible. |
Stage |
Dashboard |
The stage in which Dashboard loads the source. |
State |
Dashboard |
The lifecycle state of the source. |
UpdatedAt |
DateTimeOffset? |
When data was last loaded successfully, or null if it never was. |
| Method | Returns | Description |
|---|---|---|
ActivateAsync() |
Task |
Marks the source active and loads it if it has never loaded, or if it was disabled and is enabled again. |
RefreshAsync() |
Task |
Reloads the source. A load still running from an earlier call is cancelled and its result ignored. |
Enums
DashboardAlertOrder
Klyroo. · enum
The order of the alerts of KlyDashboard.
| Value | Description |
|---|---|
Severity |
Errors first and successes last. |
AsGiven |
The order of the items. |
DashboardAlertSeverity
Klyroo. · enum
Alert severity level for KlyDashboard.
| Value | Description |
|---|---|
Error |
A failure. Shown with the label Critical and sorted first. |
Warning |
Something that needs attention. Shown with the label Warning. |
Info |
Information. Shown with the label Info. |
Success |
A resolved condition. Shown with the label Resolved and sorted last. |
DashboardBarsEmphasis
Klyroo. · enum
Which bars of KlyDashboardBars are colored.
| Value | Description |
|---|---|
All |
Every bar is colored. |
First |
The first bar is colored and the others are muted. |
DashboardBarsVariant
Klyroo. · enum
The layout of a KlyDashboardBars block.
| Value | Description |
|---|---|
Bars |
One bar per item. |
Funnel |
A funnel: every bar is scaled to the first one and shows its share of the previous step. |
DashboardBlockPhase
Klyroo. · enum
Block rendering phase determined by KlyDashboardCard.
| Value | Description |
|---|---|
Idle |
The source has not loaded yet. The card shows a skeleton, or nothing when the source is disabled. |
Loading |
The source is loading for the first time. The card shows a skeleton. |
Error |
The source failed. The card shows the error message and a retry button. |
Empty |
The source is ready, or there is no source, but the block has nothing to show. |
Content |
The block content is rendered. |
DashboardChartSeriesType
Klyroo. · enum
How one Dashboard is drawn in a Dashboard chart.
| Value | Description |
|---|---|
Bar |
Bars, side by side with the other bar series of each category. |
Line |
A line. In a bar chart it is drawn over the bars. |
DashboardChartTotals
Klyroo. · enum
The totals row under a KlyDashboard.
| Value | Description |
|---|---|
None |
No totals row. |
Sum |
The sum of each series. Comparison series are left out. |
Average |
The average of each series. Comparison series are left out. |
DashboardChartType
Klyroo. · enum
The drawing of a KlyDashboard.
| Value | Description |
|---|---|
Bar |
One bar per series in each category, side by side. |
Line |
Every series as a line. |
Area |
Every series as a line with the area under it filled. |
Donut |
The first series that is not a comparison as a ring of slices, one per category, with the total in the middle. |
DashboardCompareMode
Klyroo. · enum
How KlyDashboardStat computes the delta from its previous value.
| Value | Description |
|---|---|
Change |
The percent change from the previous value. Nothing is shown when the previous value is zero. |
Difference |
The raw difference, multiplied by 100 for the Dashboard format. |
DashboardComparisonMode
Klyroo. · enum
Comparison period mode for date ranges and KPI comparisons.
| Value | Description |
|---|---|
None |
No comparison. |
Previous |
The period of the same length that ends the day before the range starts. |
Year |
The same dates one year earlier. February 29 becomes February 28 when the previous year is not a leap year. |
DashboardFilterKind
Klyroo. · enum
Filter control kind in a Dashboard. It picks the control drawn by the toolbar of KlyDashboardPage; the selection is always stored as strings, see Dashboard.
| Value | Description |
|---|---|
String |
Free text, drawn as a text box. The text is applied when the box loses focus or the user presses Enter. |
Number |
A number, drawn as a number box and stored in the invariant culture (1234.5). |
Boolean |
A yes or no choice, drawn as an option list. Without items it offers Dashboard (true, false). |
Date |
A single date, drawn as a date picker and stored as yyyy-MM-dd. |
DateRange |
A start and an end date, drawn as two date pickers and stored as two yyyy-MM-dd values, start then end. An open bound is an empty string. |
Enum |
One value out of a fixed set, drawn as an option list. |
Options |
A choice among Dashboard, drawn as an option list. This is the default. |
Remote |
Options loaded from a remote source, drawn as an option list. Your code loads them and assigns Dashboard, which renders the toolbar again. |
Comparison |
A Dashboard choice, drawn as an option list. Without items it offers Dashboard (none, previous, year). |
Custom |
A control drawn by the host application through the CustomFilter template of KlyDashboardPage. Without the template the toolbar leaves the filter out. |
DashboardFormatPreset
Klyroo. · enum
Preset number formats supported by DashboardFormat.
| Value | Description |
|---|---|
Number |
Grouped number with at most one decimal, switching to compact notation from 10,000 (1,234.5, 12.6K). |
Integer |
Rounded to the nearest integer, midpoints to even, with group separators (1,235). |
Decimal |
Grouped number with at most one decimal and no compact notation (1,234.5). |
Compact |
Thousands, millions and billions with at most one decimal (12.6K, 2.4M, 1.1B). |
Percent |
A value already expressed in percent, with a percent sign (14.2 gives 14.2%). |
Ratio |
A fraction multiplied by 100, with a percent sign (0.57 gives 57%). |
Delta |
A signed percent change, with a plus sign when positive (+14.2%, -4.5%). |
Points |
A signed difference in percentage points (+2.1 pts, +1 pt). |
Signed |
A grouped number with a plus sign when positive (+1,200). |
DashboardGaugeVariant
Klyroo. · enum
The drawing of a KlyDashboard.
| Value | Description |
|---|---|
Ring |
A circular gauge with the value in the middle. |
Bar |
A horizontal meter with the value above it, the minimum and maximum under it and a marker at the target. |
DashboardGridVariant
Klyroo. · enum
The layout of a KlyDashboardGrid.
| Value | Description |
|---|---|
Cards |
Separate cards with a gap. |
Panels |
The cards joined into one bordered panel with thin dividers. |
DashboardQueryStage
Klyroo. · enum
Execution stage of a dashboard query.
| Value | Description |
|---|---|
Essential |
Loaded first, all resources of this stage in parallel. Dashboard only looks at these resources. |
Background |
Loaded once every Dashboard resource has settled, in parallel with the active deferred resources. |
Deferred |
Not loaded by Dashboard until the resource is activated, by IDashboard or by the first render of a card bound to it. After that it is refreshed with the background stage. |
DashboardResourceState
Klyroo. · enum
Lifecycle state of a dashboard query or derived resource.
| Value | Description |
|---|---|
Idle |
The resource has not loaded yet, or a requires gate kept it from loading and no default value was supplied. |
Loading |
The first load is running and no data is available yet. |
Ready |
Data is available. A refresh can still be running; check IDashboard. |
Error |
The last load threw. IDashboard holds the message and the previous data, if any, is kept. |
Disabled |
The enabled predicate returned false. The data is the default value and a card bound to the resource is not rendered. |
DashboardSkeletonKind
Klyroo. · enum
Skeleton geometry kind rendered while a KlyDashboardCard is loading.
| Value | Description |
|---|---|
Rows |
Generic list rows. Rendered as three lines. |
Stat |
A large value and a caption, used by KlyDashboardStat. |
Stats |
A grid of metrics, used by KlyDashboard. Rendered as three lines. |
Gauge |
A gauge, used by KlyDashboard. Rendered as three lines. |
Details |
A definition list, used by KlyDashboard. Rendered as three lines. |
Bars |
Four vertical bars of different heights. |
Paired |
Paired bars: three groups of two vertical bars. |
Funnel |
A funnel, used by KlyDashboardBars with the funnel variant. Rendered as three lines. |
Stack |
Stacked bars: three horizontal bars split into segments. |
Table |
A table, used by KlyDashboard. Rendered as three lines. |
Feed |
A timeline, used by KlyDashboardFeed. Rendered as three lines. |
Lines |
Same shape as Dashboard, used by KlyDashboard when Type is line. |
Donut |
A donut chart, used by KlyDashboard when Type is donut. Rendered as three lines. |
DashboardStatsVariant
Klyroo. · enum
The layout of a KlyDashboard block.
| Value | Description |
|---|---|
Plain |
The metrics side by side with no frame. |
Tiles |
Each metric in a bordered tile. |
DashboardTableColumnKind
Klyroo. · enum
How a Dashboard shows and sorts its values.
| Value | Description |
|---|---|
Text |
The value as text. A string is shown as it is; a date or a number is formatted with the culture of the page on screen, and written invariantly (ISO 8601 dates, . as the decimal mark) in the table view and the CSV export. Strings sort ignoring case, other comparable values (a date) by value, and values of different types (a column of Object) by their text. |
Number |
A number formatted with the Dashboard of the column, right-aligned, sorted by value. |
Delta |
A percent change: +12.5%, green when positive and red when negative (reversed by Dashboard). |
Percent |
A percentage. |
Bar |
A number with a bar scaled to the largest value of the column. |
Klyroo.Dashboard
Components (13) · Static classes and extensions (2) · Classes (2) · Records (1)
Components
KlyDashboardAlerts
Klyroo. · component · inherits KlyComponentBase
A list of alerts ordered by severity, each with an optional value and an action link or button.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Items |
IReadOnlyList |
The alerts to display. |
Limit |
int? |
The maximum number of alerts shown, applied after ordering. The table view and the CSV export hold the same alerts. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
OnAction |
EventCallback |
Called with the alert when the user clicks its action. An alert with an ActionLabel and no ActionHref renders its action as a button only when this has a handler; without one the action is left out. An alert with an ActionHref always renders a link. |
Order |
Dashboard |
Dashboard (the default) puts errors first and successes last. Dashboard keeps the order of KlyDashboard. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 6. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardBars
Klyroo. · component · inherits KlyComponentBase
Horizontal bars for a ranking, or a funnel with the conversion rate between steps.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Emphasis |
Dashboard |
Dashboard (the default) colors every bar. Dashboard colors the first bar and mutes the others. |
Format |
Dashboard |
How the values are formatted, unless an item supplies its own Meta text. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Items |
IReadOnlyList |
The bars, in display order. |
Limit |
int? |
The maximum number of bars shown. The table view and the CSV export hold the same bars. |
Max |
double? |
The value that fills a whole bar. Defaults to the largest item. Ignored by the funnel variant. The scale always includes zero: a zero value has no bar and a negative value extends to the left of a zero line. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
OnSelect |
EventCallback |
Called with the bar when the user picks it. Each bar is then a button, so the choice works with the keyboard and with a screen reader, and aria-pressed follows Selected. Use it to drill down, for example by setting a filter of the Dashboard. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 6. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Variant |
Dashboard |
Dashboard (the default), or Dashboard: every bar is scaled to the first one and shows its share of the previous step. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardCard
Klyroo. · component · inherits KlyComponentBase
The frame shared by every block: header with title and menu, loading skeleton, error with a retry button, empty state, content, chips for active filters and a footer. Use it directly to build a custom block.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
ChildContent |
RenderFragment? |
The content of the block, rendered once the source is ready and not empty. |
EmptyDescription |
string? |
A line of text under the title of the empty state. |
EmptyTitle |
string? |
The title of the empty state. Defaults to the NoData text of the locale (No data for this period in English). |
Expandable |
bool |
Shows the Expand button in the menu, which opens the content of the card in a modal dialog (KlyModal of Klyroo.UI: the page behind is inert, the focus stays in the dialog, Escape, the close button and a click on the backdrop close it, and the focus returns to the Expand button). Defaults to true. |
Filters |
IReadOnlyList |
Filters whose non-default selection is shown as removable chips under the header. |
Footer |
RenderFragment? |
Content placed in the footer, before the freshness text. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
HeaderRight |
RenderFragment? |
Content placed in the header, before the menu buttons. |
IsEmpty |
bool |
Shows the empty state instead of the content once the source is ready. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
OnCsvExported |
EventCallback |
Receives the CSV text when the user clicks Download CSV, instead of the browser download the card starts by default. Use it to save the file yourself, for example in a .NET MAUI app where the web view cannot download. Name the file with DashboardFormat.. |
Skeleton |
Dashboard |
The shape of the loading skeleton. Stat, Bars, Lines, Paired and Stack have their own shape, the other kinds render three lines. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. The card activates a Deferred source on its first render, and on every render calls IDashboard on a disabled source, which loads it once its enabled predicate returns true. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 12. |
Subtitle |
string? |
A secondary line under the title. |
Tabulate |
Func |
Returns the content of the block as a table. It enables the View as table and Download CSV buttons. |
Title |
string? |
The heading of the block. |
ViewAsTable |
bool |
Shows the View as table button in the menu. It needs KlyDashboard. Defaults to true. |
Also accepts the parameters of KlyComponentBase.
| Property | Type | Description |
|---|---|---|
Phase |
Dashboard |
The phase the card is in, derived from the state of KlyDashboard: Idle and Loading show the skeleton, Error the message, otherwise Empty or Content. Without a source it is Content, or Empty when KlyDashboard is set. |
KlyDashboardChart
Klyroo. · component · inherits KlyComponentBase
A chart over categories without a charting dependency: grouped bars, lines, bars with line series over them, or a donut of the first series, with a legend and optional totals.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Categories |
IReadOnlyList |
The labels of the horizontal axis, one per category, or the slices of a donut. |
Format |
Dashboard |
How the values of labels, tooltips, totals and the table view are formatted. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Height |
int |
The height of the drawing in pixels at its natural width of 640. The drawing keeps its proportions and shrinks with the card, so it is shorter in a narrow one. Defaults to 220. |
Horizontal |
bool |
Draws the bars of a bar chart along the horizontal axis, with the categories on the vertical one. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
OnSelect |
EventCallback |
Called with the category, the series key and the value when the user picks a data point. In the drawing of KlyChart (every chart except the compact one described at KlyDashboard) the bars, points and slices themselves are the choice: a click on one, or Enter or Space on the one the arrow keys are on, with a pointer cursor and the same keyboard hint as KlyChart.. A pick is reported for the series it landed on, a comparison series included (its own key and value); from the keyboard, or for a series with no value in that category, it is the first series that is not a comparison and has a value, and a category with nothing to pick is ignored. The compact drawing, which KlyChart cannot draw (a bar chart with a line series, or with KlyDashboard), has no selectable marks, so it shows a group of buttons under the drawing instead, one per category and series (one per slice for a donut, comparison series left out), which works with the keyboard and with a screen reader too. Use it to drill down, for example by setting a filter of the Dashboard. |
Series |
IReadOnlyList |
The data series, all drawn (a donut draws the first one that is not a comparison) and all in the table view. Each series takes the next chart color of Klyroo.UI (--klyroo-chart-1 to --klyroo-chart-6, then neutral); comparison series are muted. |
ShowLabels |
bool |
Shows the formatted value above each bar (below a negative one). Lines, areas and donuts show their values in tooltips. It switches the chart to the compact drawing described at KlyDashboard. |
ShowLegend |
bool |
Shows the legend: the series, or the slices with their value for a donut. Defaults to true. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 8. |
Stacked |
bool |
Stacks the series of a bar or area chart instead of drawing them side by side or over one another. Comparison series are stacked too, so leave them out of a stacked chart. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Totals |
Dashboard |
The totals row: Dashboard shows the average of each series, Dashboard the sum. Comparison series are left out. Dashboard, the default, shows nothing. |
Type |
Dashboard |
The chart type: Dashboard (the default) draws one bar per series in each category, side by side; Dashboard draws every series as a line; Dashboard draws every series as a line with the area under it filled; Dashboard draws the first series that is not a comparison as a ring of slices, one per category, with the total in the middle. The drawing is KlyChart of Klyroo.UI: value and category axes, gridlines, a tooltip that follows the pointer and the arrow keys, a bar or a line that starts at zero (a zero value has no bar, a negative value goes below the axis), and a data table for screen readers. In a bar chart, a series whose Type is Dashboard is drawn as a line over the bars, but KlyChart cannot mix the two, so such a chart (and a chart with KlyDashboard) uses a compact drawing of its own: bars and lines from a zero baseline, without axes or gridlines, and KlyDashboard and KlyDashboard do not apply. The type also picks the loading skeleton. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardDetails
Klyroo. · component · inherits KlyComponentBase
A definition list of labelled values, with optional hints, links and copy buttons.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Items |
IReadOnlyList |
The definition rows. Rows marked Hidden are skipped, and rows marked Copy get a button that copies the value with navigator., which needs an interactive render mode and a secure context. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 6. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardFeed
Klyroo. · component · inherits KlyComponentBase
A timeline of events with relative times, grouped by day.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
GroupByDay |
bool |
Inserts a heading (Today, Yesterday or an ISO date) when the day changes. Defaults to true. |
Items |
IReadOnlyList |
The events, in display order. They are not sorted. |
Limit |
int? |
The maximum number of events shown. The table view and the CSV export hold the same events. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Now |
DateTimeOffset? |
The reference moment for the day headings and the relative times. The current UTC time when null; set it to get deterministic output in tests. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 6. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardGauge
Klyroo. · component · inherits KlyComponentBase
A gauge that shows a value between a minimum and a maximum, as a ring or a horizontal bar.
| Parameter | Type | Description |
|---|---|---|
Caption |
string? |
A line of text under the value inside the ring, or next to the value in the bar variant. |
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Format |
Dashboard |
How the value and the target are formatted. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Max |
double |
The value at which the gauge is full. Defaults to 100. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Min |
double |
The value at which the gauge is empty. Defaults to 0. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 4. |
Subtitle |
string? |
A secondary line under the title. |
Target |
double? |
A target shown as text under the gauge, and as a marker on the bar of the bar variant. |
Title |
string? |
The heading of the block. |
Value |
double? |
The current value. |
Variant |
Dashboard |
Dashboard (the default) draws a circular gauge with the value in the middle. Dashboard draws a horizontal meter with the value above it, the minimum and maximum under it and a marker at KlyDashboard. The variant drawn is exposed as data-variant. |
Also accepts the parameters of KlyComponentBase.
| Property | Type | Description |
|---|---|---|
Share |
double |
The filled fraction of the ring, from 0 to 1: (Value - Min) / (Max - Min), clamped. 0 when KlyDashboard is null, NaN or infinite, or KlyDashboard is not above KlyDashboard. |
KlyDashboardGrid
Klyroo. · component · inherits KlyComponentBase
A grid of equal columns (12 by default, see Columns) that places blocks by their Span, and gives them its Menu and Freshness defaults.
| Parameter | Type | Description |
|---|---|---|
ChildContent |
RenderFragment? |
The blocks of the grid. Each one sets its width with Span. |
Columns |
int |
The number of equal columns of the grid, at least 1. Defaults to 12. A block's Span is clamped to it, so with Columns="3" a block of the default span 12 fills one row and Span="1" takes a third. |
Freshness |
bool |
The default of Freshness for the blocks inside the grid. Defaults to false. |
Menu |
bool |
The default of Menu for the blocks inside the grid. Defaults to false. |
Variant |
Dashboard |
Dashboard (the default) draws separate cards with a gap. Dashboard joins the cards into one bordered panel with thin dividers. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardList
Klyroo. · component · inherits KlyComponentBase
A ranked list of rows with an optional value, percentage and delta.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Format |
Dashboard |
How the row values are formatted. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Items |
IReadOnlyList |
The rows, in display order. |
Limit |
int? |
The maximum number of rows shown. The table view and the CSV export hold the same rows. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
OnRowClick |
EventCallback |
Called with the row when the user picks it. The label of each row without an Href is then a button, so the choice works with the keyboard and with a screen reader, aria-pressed follows Selected, and a click anywhere on the row does the same for the pointer. A row with an Href keeps its link and does not raise this event. Use it to drill down, for example by setting a filter of the Dashboard. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 6. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardPage
Klyroo. · component · inherits KlyComponentBase
Page shell of a dashboard: a header with the title and a refresh button, a sticky toolbar with the view tabs and the filter controls of a Dashboard (option lists, text, number and date inputs, or your own template, depending on the filter kind), and a body for the blocks. It re-renders when the controller changes. Buttons and inputs need an interactive render mode.
| Parameter | Type | Description |
|---|---|---|
Actions |
RenderFragment? |
Content placed before the refresh button, for example your own buttons. |
ChildContent |
RenderFragment? |
The body of the page, usually a KlyDashboardGrid. The page only draws the tabs: render the content of the current view yourself from Dashboard. |
CustomFilter |
RenderFragment |
Draws each enabled filter whose Kind is Custom in the toolbar. It receives the filter: show its selection from Values and change it with Value, SetValues or Reset. Without it the toolbar leaves those filters out. |
Dashboard |
Dashboard |
The controller shown by the page: it supplies the refresh button, the view tabs and the filter pills, and the page re-renders when the controller changes. Without it only the title and the body are rendered. |
Description |
string? |
Text under the heading. When empty, the page shows an Updated line from Dashboard. once data has loaded. |
ShowFilters |
bool |
Shows a control for each enabled filter that is not headless, chosen by its Kind: a text, number or date box, two date boxes for a range, your KlyDashboard template, or a pill with an option list. Defaults to true. |
ShowRefresh |
bool |
Shows the refresh button, which calls Dashboard. Defaults to true. |
ShowTabs |
bool |
Shows the view tabs when the controller has at least two enabled views. Defaults to true. |
Sticky |
bool |
Keeps the toolbar of tabs and filters at the top of the page while the body scrolls. Defaults to true. |
SyncUrl |
bool |
Keeps the filters in the URL: the page applies the query string of the current URL to the filters of KlyDashboard once (Dashboard, also in static SSR and in a prerender, from Navigation), writes every later change back with Dashboard and a replacing navigation (no history entry per change, other query parameters kept), and applies the query again when a navigation to the same page changes it. Nothing is written in a static render, which cannot navigate. A parent initializes before this child, so a page that loads its data in OnInitialized should also call Dashboard. there, before Dashboard and LoadAsync: the first load then uses the filters of the URL, and the fingerprint of the persisted data matches between the prerender and the interactive render. The application is idempotent, so doing it in both places is harmless. Defaults to false. |
Title |
string? |
The page heading. |
UrlPrefix |
string? |
Put before the key of every filter in the URL (sales.), so that two dashboards on one page can share a query string. Only used with KlyDashboard. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardStat
Klyroo. · component · inherits KlyComponentBase
A single metric with an optional delta, sparkline, goal bar and status pill.
| Parameter | Type | Description |
|---|---|---|
Caption |
string? |
A line of text under the value. Replaces the default vs ... previous period caption. |
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Compare |
double? |
The previous value. When KlyDashboard is not set, the delta is computed from it, and the default caption names it. |
CompareMode |
Dashboard |
Dashboard (the default) computes the percent change from KlyDashboard and shows nothing when KlyDashboard is zero. Dashboard uses the raw difference, multiplied by 100 for the Ratio format. |
Delta |
double? |
The change to display, in percent. It takes precedence over KlyDashboard. |
DeltaFormat |
Dashboard |
How the delta is formatted. Defaults to Delta, or to Points or Signed when KlyDashboard is Dashboard. |
Format |
Dashboard |
How KlyDashboard, KlyDashboard and KlyDashboard are formatted. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Goal |
double? |
A target that adds a progress bar and a percentage. It must be greater than 0. |
InvertDelta |
bool |
When set, a negative delta is shown as good news (for churn, cost or latency). |
Label |
string |
The name of the metric, shown as the card title. Required. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 4. |
Status |
DashboardStatus? |
A status pill in the header. |
TextValue |
string? |
Text shown instead of the formatted KlyDashboard, for values that are not numbers. |
Trend |
IReadOnlyList |
Points of a sparkline. It needs at least two values. |
Value |
double? |
The value, formatted with KlyDashboard. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardStats
Klyroo. · component · inherits KlyComponentBase
Several metrics side by side, each with an optional delta, progress bar and status pill.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Items |
IReadOnlyList |
The metrics, laid out in a grid of up to four columns. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 12. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Variant |
Dashboard |
Dashboard (the default) or Dashboard, which puts each metric in a bordered tile. |
Also accepts the parameters of KlyComponentBase.
KlyDashboardTable<TRow>
Klyroo. · component · inherits KlyComponentBase
A table over rows of your own type, with typed columns (text, number, delta, percent, bar) and click-to-sort headers.
| Parameter | Type | Description |
|---|---|---|
Card |
bool |
Whether the block draws its own surface (border, background and shadow; only the background in a panels grid). Defaults to true. |
Columns |
IReadOnlyList |
The column definitions, in display order. |
Freshness |
bool? |
Shows an Updated footer built from Source.. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
Limit |
int? |
The maximum number of rows shown, applied after sorting. The CSV export holds the same rows. |
Menu |
bool? |
Shows the View as table, Download CSV and Expand buttons in the header once the content is displayed. Download CSV saves the block's table as a CSV file named after the title. When null, the value of the enclosing KlyDashboard applies, or false outside a grid. |
OnRowClick |
EventCallback |
Called with the row (the item of KlyDashboard) when the user picks it. The first cell of each row is then a button, so the choice works with the keyboard and with a screen reader, and a click anywhere on the row does the same for the pointer. Use it to drill down, for example by setting a filter of the Dashboard. |
Rows |
IReadOnlyList |
The rows. Each column reads its value from the row with its own delegate (Dashboardnullvalue shows the missing-value placeholder. Blazor infersTRowfrom this list or fromKlyDashboardTable.Columns`. |
Sort |
Dashboard |
The active sort. The table updates it itself when a header is clicked, and KlyDashboard reports the change. Numeric columns sort descending first, then ascending, then unsorted. Empty cells always come last. |
SortChanged |
EventCallback |
Raised when the sort changes, with null when the sort is cleared. |
Source |
IDashboard |
The resource whose state drives the block: a skeleton while it loads, an error message with a retry button, then the content. The block does not read Data from it, so pass the data through the other parameters. Without a source the content renders immediately. |
Span |
int |
Width of the block in columns of the grid, clamped between 1 and the Columns of the enclosing KlyDashboardGrid (12 outside a grid). Defaults to 12. |
Subtitle |
string? |
A secondary line under the title. |
Title |
string? |
The heading of the block. |
Also accepts the parameters of KlyComponentBase.
Static classes and extensions
DashboardLocales
Klyroo. · service
The built-in texts of Klyroo.Dashboard, one set per locale of KlyLocales. and keyed by the same codes. A component picks the set of its current KlyLocale. with KlyLocales., so "pt-PT" gets "pt" and an unknown language gets English. Change a set with Klyroo.
| Property | Type | Description |
|---|---|---|
static Ar |
DashboardTexts |
العربية (ar). Needs review. |
static De |
DashboardTexts |
Deutsch (de). Needs review. |
static En |
DashboardTexts |
English. |
static Es |
DashboardTexts |
Español (es). Needs review. |
static Fr |
DashboardTexts |
Français (fr). Reviewed. |
static It |
DashboardTexts |
Italiano (it). Needs review. |
static Ja |
DashboardTexts |
日本語 (ja). Needs review. |
static Nl |
DashboardTexts |
Nederlands (nl). Needs review. |
static Pt |
DashboardTexts |
Português (pt). Needs review. |
static PtBr |
DashboardTexts |
Português do Brasil (pt-BR). Needs review. |
static Reviewed |
IReadOnlyList |
The codes whose texts were reviewed by a native speaker. The other sets are drafts waiting for review. |
static Ru |
DashboardTexts |
Русский (ru). Needs review. |
static Tables |
IRead |
Every set by locale code: the codes of KlyLocales.. |
static ZhCn |
DashboardTexts |
简体中文 (zh-Hans). Needs review. |
KlyrooDashboardServiceCollectionExtensions
Klyroo. · service
Registration of the Klyroo.Dashboard services.
| Method | Returns | Description |
|---|---|---|
static Add |
IService |
Registers the services the dashboard components need: Dashboard (scoped), the Klyroo, and Klyroo.UI through AddKlyrooUi(), so a second call to AddKlyrooUi() is not needed. |
Classes
DashboardPersistence
Klyroo. · class
Hands the data the prerender of a page loaded to its interactive render, so the resources do not load twice. In OnInitialized, register the resources, set the filters, call Dashboard, then load with Dashboard: in the prerender the ready resources are written into the persistent component state of the page, and in the interactive render they take that data back, which Dashboard keeps instead of loading again. Only resources created with a json type info take part (see IDashboard).
| Constructor | Description |
|---|---|
Dashboard |
Creates the service. Use the instance AddKlyroo registers rather than creating one. |
| Method | Returns | Description |
|---|---|---|
Attach |
IDisposable |
Restores the resources of dashboard that the previous render handed over, and hands them over at the end of this render. Call it after registering the resources and setting the filters: a resource registered later is handed over but never restored, and data written under other filter values is refused. |
KlyrooDashboardOptions
Klyroo. · class
Options of Klyroo.Dashboard, set with services.: the hand-over of prerendered data and the built-in texts of each locale. It is an extension of KlyrooOptions (`KlyrooOptions.Extension``), so configure it in code shared by the server and the WebAssembly client.
| Property | Type | Description |
|---|---|---|
PersistMaxAge (get, set) |
TimeSpan |
The oldest handed-over data Dashboard restores (5 minutes by default), measured from when it was loaded. A prerender hands its data over within seconds, but .NET can also persist the state of an Interactive Server circuit when it pauses and give it back when the circuit resumes, possibly much later: older data is dropped and the resource loads again. |
PersistMaxBytes (get, set) |
int |
The largest data, in bytes as sent, that one resource hands from the prerender to the interactive render through Dashboard (8 KB by default). The size counts the escaping and the two base64 encodings Blazor adds, so the JSON of the data itself is about a third of it. A resource over it is not handed over: the interactive render loads it again once. All the resources, and the other Klyroo libraries of the page (Klyroo.Table lists), also share KlyrooOptions. (28 KB as sent by default): the message that starts an Interactive Server circuit carries all of it, and SignalR refuses it past 32 KB. |
| Method | Returns | Description |
|---|---|---|
Texts |
Klyroo |
Changes the texts of a locale, like KlyLocales. does for Klyroo.UI: change receives the set the locale resolves to and returns the one to use, usually t => t with { ... }. localeCode is a code of KlyLocales. ("fr"), or the code of a locale you added ("en-AU", "tlh"): a locale without a set of its own starts from the set KlyLocales. picks for it, then its changes apply. The texts become read-only the first time a component resolves one. |
Records
DashboardTexts
Klyroo. · record
The built-in texts of the dashboard components: toolbar and card buttons, accessible names, empty and error states, column headers of the table view and the CSV export, and relative times. There is one set per locale of Klyroo.UI (DashboardLocales), and a component shows the set of its current locale, the one its Messages come from. Change a set with Klyroo in AddKlyroo.
| Constructor | Description |
|---|---|
DashboardTexts() |
Creates the texts with their English defaults. |
| Property | Type | Description |
|---|---|---|
ClearFilter (init) |
Func |
The accessible name of the button that clears a filter, given its label ("Clear Region"). |
Collapse (init) |
string |
The button that closes the enlarged block ("Collapse"). |
ColumnAlert (init) |
string |
The alert column of Alerts ("Alert"). |
ColumnCategory (init) |
string |
The first column of a chart table ("Category"). |
ColumnChange (init) |
string |
The change column of a Stat whose change is neither a percent nor points ("Change"). |
Column (init) |
string |
The percent change column ("Change (%)"). |
Column (init) |
string |
The change column of a Stat compared in points ("Change (pts)"). |
Column (init) |
string |
The description column of List, Feed and Alerts ("Description"). |
ColumnEvent (init) |
string |
The event column of a Feed ("Event"). |
ColumnGoal (init) |
string |
The goal column of a Stat ("Goal"). |
ColumnLabel (init) |
string |
The name column of the table view of Bars, List, Stat, Stats and Gauge ("Label"). |
ColumnMaximum (init) |
string |
The maximum column of a Gauge ("Maximum"). |
ColumnMinimum (init) |
string |
The minimum column of a Gauge ("Minimum"). |
ColumnPercent (init) |
string |
The percent column of a List ("Percent (%)"). |
ColumnPrevious (init) |
string |
The previous value column of a Stat ("Previous"). |
ColumnSeverity (init) |
string |
The severity column of Alerts ("Severity"). |
ColumnTarget (init) |
string |
The target column of a Gauge ("Target"). |
ColumnTime (init) |
string |
The time column of a Feed ("Time"). |
ColumnValue (init) |
string |
The value column ("Value"). |
Copy (init) |
string |
The tooltip of the copy button of a Details row ("Copy"). |
CopyValue (init) |
Func |
The accessible name of the copy button of a Details row, given the row label ("Copy Order id"). |
DownloadCsv (init) |
string |
The button that saves the block as a CSV file ("Download CSV"). |
ErrorMessage (init) |
string |
The text of the failed-load message when the resource gives no message of its own. |
ErrorTitle (init) |
string |
The title of the message shown when a resource failed to load ("This data could not be loaded"). |
Expand (init) |
string |
The button that enlarges the block in a dialog ("Expand"). |
FilterFrom (init) |
Func |
The accessible name of the start box of a date range filter, given its label ("Period from"). |
Filters (init) |
string |
The accessible name of the filter toolbar ("Filters"). |
FilterTo (init) |
Func |
The accessible name of the end box of a date range filter, given its label ("Period to"). |
FunnelBase (init) |
string |
The note of the first step of a funnel ("base 100%"). |
FunnelStep (init) |
Func |
The note of a later step of a funnel, given its share of the previous step in percent ("60% of the previous step"). |
Gauge (init) |
string |
The accessible name of a Gauge without a title, and its label in the table view ("Gauge"). |
Goal (init) |
Func |
The goal line of a Stat, given the formatted goal ("Goal 1,000"). |
HideTable (init) |
string |
The button that returns from the table view to the block ("Hide table"). |
NoData (init) |
string |
The title of an empty block ("No data for this period"). |
Nothing (init) |
string |
The title of an empty Alerts block ("Nothing needs attention"). |
Refresh (init) |
string |
The refresh button of the page ("Refresh"), also its accessible name. |
Refreshing (init) |
string |
The refresh button of the page while a load is running ("Refreshing…"). |
RelativeDays (init) |
Func |
A moment less than a week ago, given the days ("3 days ago"). |
RelativeHours (init) |
Func |
A moment less than 22 hours ago, given the hours ("3 hr ago"). |
RelativeJustNow (init) |
string |
A moment under 45 seconds ago ("just now"). |
RelativeMinutes (init) |
Func |
A moment less than 45 minutes ago, given the minutes ("5 min ago"). |
RelativeTime |
Dashboard |
The relative times as the DashboardFormat. overload takes them. |
Relative (init) |
string |
A moment about a day ago ("yesterday"). |
RemoveFilter (init) |
Func |
The accessible name of the button that removes a filter chip of a card, given the filter label ("Remove Region"). |
ResetFilters (init) |
string |
The button that restores every filter ("Reset"). |
Retry (init) |
string |
The button that loads a failed resource again ("Retry"). |
SearchFilter (init) |
Func |
The accessible name of the search box of a filter menu, given the filter label ("Search Region"). |
Search (init) |
string |
The placeholder of the search box of a filter menu ("Search…"). |
SelectPoint (init) |
string |
The accessible name of the group of buttons that select a data point of the compact chart drawing ("Select a data point"); the drawing of KlyChart makes its own bars, points and slices selectable instead. |
SeverityCritical (init) |
string |
The badge of an error alert ("Critical"). |
SeverityInfo (init) |
string |
The badge of an informational alert ("Info"). |
SeverityResolved (init) |
string |
The badge of a resolved alert ("Resolved"). |
SeverityWarning (init) |
string |
The badge of a warning alert ("Warning"). |
Target (init) |
Func |
The target line of a Gauge, given the formatted target ("Target: 80%"). |
Today (init) |
string |
The day heading of a Feed for the current day ("Today"). |
Updated (init) |
Func |
The freshness line of the page and of the cards, given the relative time ("Updated 5 min ago"). |
VersusPrevious (init) |
Func |
The caption of a Stat compared with a previous value, given the formatted value ("vs 900 previous period"). |
ViewAsTable (init) |
string |
The button that shows the block as a table ("View as table"). |
Views (init) |
string |
The accessible name of the view tabs ("Views"). |
Yesterday (init) |
string |
The day heading of a Feed for the previous day ("Yesterday"). |