Incident Chart
A line chart that draws itself, flags a spike with a marker and a label, and sends the alert to a phone-style panel in step with it.
pixikit.com/docs/blocks/diagrams/incident-chart
Customize
Height220px
Line color
Alert color
Ok color
Duration8.0s
Loop
Play on
Props
17| Name | Type | Default | Description |
|---|---|---|---|
title | string | "Know the moment something changes" | The heading above the chart. Leave empty for none. |
description | string | "The line draws itself, the spike is flagged, and the alert lands on a phone in step with it." | The line under the heading. Leave empty for none. |
data | number[] | DEFAULT_DATA | The values the line draws, left to right. |
xLabels | string[] | ["02:00", "02:30", "03:00", "03:30", "04:00"] | Labels spread evenly under the chart. |
events | (string | IncidentChartEvent)[] | ["03:12 flagged", "03:14 back to normal"] | Points to flag, by their index in `data`. A plain string is a label: alert and resolved take turns, placed where the line crosses its midpoint. |
messages | (string | IncidentChartMessage)[] | ["CPU on web-2 jumped to 96% at 03:12.", "An unknown process started at 03:11. It has been stopped.", "All clear. Usage is back to normal."] | Messages that arrive in the panel in step with the events. A plain string follows the event of the same index, or the last one. |
chartLabel | string | "web-2 · CPU" | The small label above the chart. |
panelLabel | string | "Alerts" | The small label at the top of the panel. |
max | number | None | The top of the scale. Defaults to a little above the largest value. |
height | number | 220 | The chart's height in pixels. |
lineColor | string | "currentColor" | The line. `currentColor` follows the text colour. |
alertColor | string | "#dc2626" | Alert markers and labels. |
okColor | string | "#16a34a" | Markers and labels for an event that is resolved. |
duration | number | 8 | One run of the drawing, in seconds; the line takes the first 60%. |
loop | boolean | true | Play again after each run. |
playOn | "view" | "hover" | "always" | "view" | When it plays: once on screen, while pointed at (on screen on touch screens), or always. It pauses off screen. |
className | string | None |