lenards/elm-patternfly-charts/1.0.0

NOTE: the latest version is 1.0.1

PF6.Charts.DonutUtilization

Donut utilization chart — a single-metric donut showing used vs available.

A specialized PatternFly donut variant for capacity/quota displays. Shows one arc for the "used" portion; the rest is unfilled background. Colors shift to warning/danger as thresholds are crossed.

Type

An opaque donut utilization chart configuration.

Constructor

fromData : Float -> Float -> DonutUtilization

Create a donut utilization chart.

chart =
    DonutUtilization.fromData 48 100

This shows 48 out of 100 (48%) utilization.

Modifiers

Set the overall SVG size. Default: 230.

Set the chart title rendered below the donut.

Set the warning threshold percentage. Default: 75.

Above this percentage, the arc turns gold/yellow.

Set the danger threshold percentage. Default: 90.

Above this percentage, the arc turns red/orange.

Show a skeleton placeholder instead of the chart while data is loading.

Renderer

toSvg : DonutUtilization -> Html msg

Render to Html msg.