Skip to main content

    Sparkline

    The Sparkline is a compact and simple data visualization that displays a trend or pattern of data in a small, condensed format. It typically consists of a single line or area graph, without axes or labels, that represents the variation of data points over time.

    SparklineProps

    NameTypeDefaultDescription
    data
    | []

    Data to show

    color?

    Sparkline color

    variant?

    Sparkline variant (line, area)

    showTicks?

    Whether Sparkline shows X Axis ticks or not

    loading?

    When true: Sets an overlay with default loader

    gapPolicy?

    Gap policy

    curve?
    'linear'

    Curve shape of the series

    showContextValues?

    Whether Sparkline shows min/max values or not

    SparklineYAxisProps

    NameTypeDefaultDescription
    max?
    |
    'data-max'

    Maximal value on the y-axis.

    min?
    |
    'data-min'

    Minimal value on the y-axis.

    scale?
    'linear'

    The scale of the Y axis values. Is only applied to the bar variant.

    SparklineThresholdProps

    Deprecated

    Use Sparkline.ThresholdIndicatorProps instead.

    NameTypeDefaultDescription
    data

    The threshold data to be graphed by the component

    color

    The unique color picked for this timeseries representation in HEX, RGB, Color Token or HSL.

    strokeOnly?

    Whereas to show the threshold ranges filled or only the strokes

    Sparkline.ThresholdIndicator

    Sparkline.ThresholdIndicator provides a slot for defining thresholds in the chart.

    SparklineThresholdIndicatorProps

    NameTypeDefaultDescription
    data

    The threshold data to be graphed by the component

    color

    The unique color picked for this timeseries representation in HEX, RGB, Color Token or HSL.

    strokeOnly?

    Whereas to show the threshold ranges filled or only the strokes

    Still have questions?
    Find answers in the Dynatrace Community