Skip to main content
cngx-src documentation

CngxChartAnnouncer

ComponentPrimaryOnPushv0.1.0WCAG AA

projects/common/chart/chart/chart-announcer.component.ts

Import#

import { CngxChartAnnouncer } from '@cngx/common/chart'

Description#

Companion live-region announcer for <cngx-chart>. Mount it next to a chart and bind the chart instance; it voices the chart's significantChange() events to assistive technology through two always-in-DOM regions with a severity split (W3C ARIA practice):

  • trend flips -> a polite role="status" region (informational);
  • threshold crossings -> an assertive role="alert" region (operationally significant, warrants interruption).

Both announcements are pure-derivation computeds the template interpolates - there is no effect() bridge and nothing to wrap in untracked() (same shape as CngxRecyclerAnnouncer). Text is localised through CNGX_CHART_I18N.

<cngx-chart #c [data]="points()" />
<cngx-chart-announcer [cngxChartAnnouncer]="c" />

https://cngxjs.github.io/cngx/examples/#/common/chart/realtime/streaming-telemetry

Metadata#

Host#

Index#

Inputs#

input()Required

The chart instance whose significantChange() this announcer voices.

default { alias: 'cngxChartAnnouncer' }