Skip to main content
WireKit
Copy for LLM

Annotations

Annotations layer visual markers ON TOP of the chart — vertical lines for events, horizontal regions for target zones, point labels for outliers, image overlays for milestones. ApexCharts has annotations BUILT IN (no plugin install). Chart.js requires chartjs-plugin-annotation separately.

WireKit's <x-wirekit-chart> accepts an annotations prop that is passed through to BOTH adapters. Whichever is active picks up its expected location:

  • ApexCharts: options.annotations.{xaxis,yaxis,points}
  • Chart.js: options.plugins.annotation.annotations (graceful no-op when the plugin is missing)

Vertical line — Event marker

Revenue trend with launch-event marker

Horizontal region — Target zone

Revenue with target zone overlay

Point annotation — Outlier callout

<x-wirekit-chart
    type="line"
    :labels="['Mon', 'Tue', 'Wed', 'Thu', 'Fri']"
    :datasets="[['label' => 'API errors', 'data' => [12, 18, 142, 22, 15]]]"
    :annotations="[
        'points' => [
            [
                'x' => 'Wed',
                'y' => 142,
                'marker' => ['size' => 8, 'fillColor' => 'var(--color-wk-danger)'],
                'label' => [
                    'text' => 'Outage incident',
                    'borderColor' => 'var(--color-wk-danger)',
                ],
            ],
        ],
    ]"
/>

License note

ApexCharts is non-MIT — see the License section on the Chart overview page and apexcharts.com/license for the full terms.

See Also

Design Tokens

See ApexCharts adapter — Design Tokens for the color, typography, and grid tokens shared across every ApexCharts demo.