Zones
LineZoneRange, SeriesZones, ZoneBoundary, ZoneRange: generated from the source of active-charts.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Types#
- Type
type LineZone Range = Omit<Zone Range, 'fill'>;
A line's zone range: a line has no fill.
The zones of a line or an area series (T3): its paint split where the DRAWN path crosses a boundary, on the curve as drawn (linear, monotone, Catmull-Rom, the steps), on a log axis as on a linear one; never at the next data point.
axis: 'y'(default) splits by value: below a target, negative values. On an area the filled region is split by height too (the fill below 100 in one paint, above it in another).axis: 'x'splits by position: history and forecast. On a number, log, sqrt, time or ordinal-time x axis; not on a category axis.
Ranges are read in the given order; a value in two ranges belongs to the earlier (development diagnostic), a value in none keeps the series paint. A range that cannot be read (from at or above to, a boundary that is not a finite number or date) is ignored with a diagnostic. A point marker takes the zone of its own value; an explicit marker paint wins. A stacked area takes x zones only. Missing values stay gaps. Under forced colours the zone colours give way to the series' system colour and the dash remains. No legend entry and no CSV column.
interface SeriesZones<TRange extends LineZoneRange = ZoneRange> {
axis?: 'x' | 'y';
ranges: readonly TRange[];
}A boundary of a zone, in the value type of its axis: a number on a value axis or a numeric x axis, a date (Date, an ISO string or epoch milliseconds, as the data itself) on a time or ordinal-time x axis.
type ZoneBoundary = number | Date | IsoDateString;One range of a series' zones (T3): the values from from (inclusive) up to to (exclusive), the class rule of the heatmap's named classes. An absent from reaches every lower value, an absent to every higher one.
A zone changes paint only: stroke, fill (an area's) and line; what it leaves out keeps the series' own. Never width, opacity, gradient shape, marker shape or size, curve or animation.
interface ZoneRange {
from?: ZoneBoundary;
to?: ZoneBoundary;
stroke?: string;
fill?: string;
lineDash?: number[];
name?: string;
}