CngxChartContext
projects/common/chart/chart/chart-context.ts
Referenced by#
Import#
import { CngxChartContext } from '@cngx/common/chart'
Description#
Reactive context published by <cngx-chart> to its content children.
Layer atoms ([cngxLine], [cngxBar], ...) and [cngxAxis] inject
CNGX_CHART_CONTEXT to read the parent chart's scales,
dimensions, data length, and data array without needing a direct
reference to the parent class. Token is non-generic at the DI
boundary; layer atoms call data<T>() to narrow the array to their
own <T> - the single boundary cast lives inside CngxChart's
data<U>() method, not at every consumer site.
Index#
Properties
Methods
Instance Properties#
SignalSignalMethods#
T[]Generic-aware data accessor. Reads the chart's reactive data
array; the consumer's <T> parameter narrows the returned type
without a per-call cast at the consumer site. The chart performs
one boundary cast in its implementation.