Skip to content
PixiKit

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
NameTypeDefaultDescription
titlestring"Know the moment something changes"The heading above the chart. Leave empty for none.
descriptionstring"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.
datanumber[]DEFAULT_DATAThe values the line draws, left to right.
xLabelsstring[]["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.
chartLabelstring"web-2 · CPU"The small label above the chart.
panelLabelstring"Alerts"The small label at the top of the panel.
maxnumberNoneThe top of the scale. Defaults to a little above the largest value.
heightnumber220The chart's height in pixels.
lineColorstring"currentColor"The line. `currentColor` follows the text colour.
alertColorstring"#dc2626"Alert markers and labels.
okColorstring"#16a34a"Markers and labels for an event that is resolved.
durationnumber8One run of the drawing, in seconds; the line takes the first 60%.
loopbooleantruePlay 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.
classNamestringNone

More diagrams blocks in Pro

View all

Related