GraphSlo

Import

svelte
import { GraphSlo } from 'markgraphy';

Basic usage

svelte
<GraphSlo
  title="example"
  budget={0}
  window={30}
/>
[ example ]

0%

window
30d
burn rate
time-to-empty
target
actual
Error budget 0 percent spent of a 30d window .

Props

PropTypeDefaultDescription
titlestring
budgetnumberFraction of the error budget consumed, 0–1.
window?number30Window length in the chosen unit. Default 30.
unit?`‘h’‘d’‘w’
target?numberAllowed error rate as a fraction, e.g. 0.001 for 99.9%.
actual?numberActual error rate as a fraction.
burnRate?numberBurn rate multiplier (1 = on pace). If set, takes precedence over elapsed.
elapsed?numberDays (or hours, weeks) elapsed so far. Used to compute time-to-empty.
daily?number[]Optional sparkline of daily burn samples, 0..1 each.
caption?stringOptional caption below the panel.
corner?string
class?string''

Exported types

  • GraphSloProps