CngxLine
projects/common/chart/layers/line.component.ts
Import#
import { CngxLine } from '@cngx/common/chart'
Description#
Line layer atom. Renders a single SVG <path> connecting the data
points projected through the parent chart's scales. Reads scales
from CNGX_CHART_CONTEXT, NOT from a parent class.
Attribute-selector on <svg:g> — the host element IS the SVG group.
Element selectors create XHTML-namespaced custom elements inside
SVG, which break layout for the namespaced children. Apply this
directive on an <svg:g> host instead.
The d string is cascade-guarded with string equality on its
computed so downstream effects only re-run when the path
geometry actually changes. The createPathBuilder cache provides
the compute guard — same (data, xScale, yScale) triple by
reference skips the per-datapoint projection work.
Metadata#
Relationships
Index#
Inputs#
LineYAccessor(d: T) => Number(d)readonly T[] | undefinedLineXAccessor | undefined