Cross Lines are lines or shaded areas in a chart that denote additional information or thresholds, making them useful for data analysis.
Adding Cross Lines Copy Link
To add a Cross Line at a specific data value on an axis, use the crossLines property in the axis options.
A Cross Line can either be a line or a range, and multiple Cross Lines can be added to a single axis.
import React, { useState } from "react";
import { createRoot } from "react-dom/client";
import { AgCharts } from "ag-charts-react";
import {
AgChartOptions,
CategoryAxisModule,
CrossLinesModule,
LegendModule,
LineSeriesModule,
ModuleRegistry,
NumberAxisModule,
} from "ag-charts-community";
import { getData } from "./data";
ModuleRegistry.registerModules([
CategoryAxisModule,
CrossLinesModule,
LegendModule,
LineSeriesModule,
NumberAxisModule,
]);
const ChartExample = () => {
const [options, setOptions] = useState<AgChartOptions>({
data: getData(),
series: [
{
type: "line",
xKey: "month",
yKey: "temp",
},
],
axes: {
x: {
type: "category",
title: {
text: "Month",
},
crossLines: [
{
type: "range",
range: ["Jun", "Sep"],
},
],
},
y: {
type: "number",
title: {
text: "Temperature (°C)",
},
crossLines: [
{
type: "line",
value: 11,
},
],
},
},
});
return <AgCharts options={options} />;
};
const root = createRoot(document.getElementById("root")!);
root.render(<ChartExample />);
{
axes: {
y: {
type: 'number',
crossLines: [
{
type: 'line',
value: 11,
},
],
},
x: {
type: 'category',
crossLines: [
{
type: 'range',
range: ['Jun', 'Sep'],
},
],
},
},
}In this configuration:
- A
lineis displayed on the vertical axis at value 11. - A
rangeis displayed on the horizontal axis between June and September. - The
valueorrangevalues should be the same types as those displayed in the axis.
Customising Cross Lines Copy Link
import React, { useState } from "react";
import { createRoot } from "react-dom/client";
import { AgCharts } from "ag-charts-react";
import {
AgChartOptions,
CrossLinesModule,
LegendModule,
LineSeriesModule,
ModuleRegistry,
NumberAxisModule,
UnitTimeAxisModule,
} from "ag-charts-community";
import { getData } from "./data";
ModuleRegistry.registerModules([
CrossLinesModule,
LegendModule,
LineSeriesModule,
NumberAxisModule,
UnitTimeAxisModule,
]);
const ChartExample = () => {
const [options, setOptions] = useState<AgChartOptions>({
data: getData(),
series: [
{
type: "line",
xKey: "date",
yKey: "petrol",
yName: "Petrol",
},
{
type: "line",
xKey: "date",
yKey: "diesel",
yName: "Diesel",
},
],
axes: {
x: {
type: "unit-time",
title: {
text: "Date",
},
crossLines: [
{
type: "range",
range: [new Date(2019, 4, 1), new Date(2019, 6, 1)],
strokeWidth: 0,
fill: "#7290C4",
fillOpacity: 0.4,
label: {
text: "Price Peak",
placement: "top",
fontSize: 14,
fill: "#7290C4",
fillOpacity: 0.4,
cornerRadius: 4,
border: {
stroke: "#7290C4",
},
},
},
],
},
y: {
type: "number",
title: {
text: "Price in pence",
},
crossLines: [
{
type: "line",
value: 142.45,
stroke: "#7290C4",
lineDash: [6, 12],
label: {
text: "142.4",
placement: "right",
fontSize: 12,
color: "#000000",
},
},
{
type: "line",
value: 133.8,
stroke: "#7290C4",
lineDash: [6, 12],
label: {
text: "133.8",
placement: "right",
fontSize: 12,
color: "#01c185",
},
},
{
type: "line",
value: 135.35,
stroke: "#D21E75",
lineDash: [2, 4],
label: {
text: "135.3",
placement: "right",
fontSize: 12,
color: "#000000",
},
},
{
type: "line",
value: 123.97,
stroke: "#D21E75",
lineDash: [2, 4],
label: {
text: "124.0",
placement: "right",
fontSize: 12,
color: "#01c185",
},
},
],
},
},
});
return <AgCharts options={options} />;
};
const root = createRoot(document.getElementById("root")!);
root.render(<ChartExample />);
{
crossLines: [
{
type: 'range',
range: [new Date(2019, 4, 1), new Date(2019, 6, 1)],
strokeWidth: 0,
fill: '#7290C4',
fillOpacity: 0.4,
label: {
text: 'Price Peak',
placement: 'top',
fontSize: 14,
},
},
],
}In this configuration:
- Properties such as
stroke,strokeWidth, andfillare used to customise the Cross Line. - A label is added, customised and placed in relation to the Cross Line. See Label Placement for more details.
Label Placement Copy Link
Use label.placement to choose where a label sits relative to its Cross Line. The default is top.
import React, { useState, Fragment } from "react";
import { createRoot } from "react-dom/client";
import { AgCharts } from "ag-charts-react";
import {
AgCartesianChartOptions,
AgCartesianCrossLineLabelPlacement,
CrossLinesModule,
LineSeriesModule,
ModuleRegistry,
NumberAxisModule,
TimeAxisModule,
} from "ag-charts-community";
import { getData } from "./data";
import clone from "clone";
ModuleRegistry.registerModules([
CrossLinesModule,
LineSeriesModule,
NumberAxisModule,
TimeAxisModule,
]);
const ChartExample = () => {
const [options, setOptions] = useState<AgCartesianChartOptions>({
data: getData(),
title: {
text: "Monthly Revenue",
},
series: [
{
type: "line",
xKey: "month",
yKey: "revenue",
yName: "Revenue",
},
],
axes: {
x: {
type: "time",
crossLines: [
{
type: "line",
value: new Date(2025, 9, 1),
label: { text: "Launch", placement: "left-top" },
},
{
type: "range",
enabled: false,
range: [new Date(2025, 5, 1), new Date(2025, 7, 1)],
label: { text: "Promotion", placement: "top" },
},
],
},
y: {
type: "number",
title: {
text: "Revenue (£k)",
},
crossLines: [
{
type: "line",
enabled: false,
value: 250,
label: { text: "Target", placement: "top" },
},
{
type: "range",
range: [180, 210],
label: { text: "Baseline", placement: "inside-top-left" },
},
],
},
},
});
const setPlacement = (
axis: "x" | "y",
type: "line" | "range",
placement: AgCartesianCrossLineLabelPlacement,
) => {
const nextOptions = clone(options);
for (const crossLine of nextOptions.axes![axis]!.crossLines!) {
if (crossLine.type === type) {
crossLine.label!.placement = placement;
}
}
setOptions(nextOptions);
};
const toggleCrossLine = (
axis: "x" | "y",
type: "line" | "range",
enabled: boolean,
) => {
const nextOptions = clone(options);
for (const crossLine of nextOptions.axes![axis]!.crossLines!) {
if (crossLine.type === type) {
crossLine.enabled = enabled;
}
}
setOptions(nextOptions);
};
return (
<Fragment>
<div className="example-controls">
<div className="controls-row">
<span className="gap-right">X Axis:</span>
<input
type="checkbox"
id="xLine"
defaultChecked
onChange={(event) =>
toggleCrossLine("x", "line", event.target.checked)
}
/>
<label htmlFor="xLine">Line</label>
<input
type="checkbox"
id="xRange"
className="gap-left"
onChange={(event) =>
toggleCrossLine("x", "range", event.target.checked)
}
/>
<label htmlFor="xRange" className="gap-right">
Range
</label>
<label htmlFor="xLinePlacement">Line Placement:</label>
<select
id="xLinePlacement"
className="gap-right"
onChange={(event) => setPlacement("x", "line", event.target.value)}
>
<option value="left-top">left-top</option>
<option value="top">top</option>
<option value="bottom">bottom</option>
<option value="left">left</option>
<option value="left-bottom">left-bottom</option>
<option value="right">right</option>
<option value="right-top">right-top</option>
<option value="right-bottom">right-bottom</option>
<option value="inside">inside</option>
<option value="inside-top">inside-top</option>
<option value="inside-bottom">inside-bottom</option>
</select>
<label htmlFor="xRangePlacement">Range Placement:</label>
<select
id="xRangePlacement"
onChange={(event) => setPlacement("x", "range", event.target.value)}
>
<option value="top">top</option>
<option value="top-left">top-left</option>
<option value="top-right">top-right</option>
<option value="bottom">bottom</option>
<option value="bottom-left">bottom-left</option>
<option value="bottom-right">bottom-right</option>
<option value="left">left</option>
<option value="left-top">left-top</option>
<option value="left-bottom">left-bottom</option>
<option value="right">right</option>
<option value="right-top">right-top</option>
<option value="right-bottom">right-bottom</option>
<option value="inside">inside</option>
<option value="inside-top">inside-top</option>
<option value="inside-bottom">inside-bottom</option>
<option value="inside-left">inside-left</option>
<option value="inside-right">inside-right</option>
<option value="inside-top-left">inside-top-left</option>
<option value="inside-top-right">inside-top-right</option>
<option value="inside-bottom-left">inside-bottom-left</option>
<option value="inside-bottom-right">inside-bottom-right</option>
</select>
</div>
<div className="controls-row">
<span className="gap-right">Y Axis:</span>
<input
type="checkbox"
id="yLine"
onChange={(event) =>
toggleCrossLine("y", "line", event.target.checked)
}
/>
<label htmlFor="yLine">Line</label>
<input
type="checkbox"
id="yRange"
className="gap-left"
defaultChecked
onChange={(event) =>
toggleCrossLine("y", "range", event.target.checked)
}
/>
<label htmlFor="yRange" className="gap-right">
Range
</label>
<label htmlFor="yLinePlacement">Line Placement:</label>
<select
id="yLinePlacement"
className="gap-right"
onChange={(event) => setPlacement("y", "line", event.target.value)}
>
<option value="top">top</option>
<option value="top-left">top-left</option>
<option value="top-right">top-right</option>
<option value="bottom">bottom</option>
<option value="bottom-left">bottom-left</option>
<option value="bottom-right">bottom-right</option>
<option value="left">left</option>
<option value="right">right</option>
<option value="inside">inside</option>
<option value="inside-left">inside-left</option>
<option value="inside-right">inside-right</option>
</select>
<label htmlFor="yRangePlacement">Range Placement:</label>
<select
id="yRangePlacement"
onChange={(event) => setPlacement("y", "range", event.target.value)}
>
<option value="inside-top-left">inside-top-left</option>
<option value="top">top</option>
<option value="top-left">top-left</option>
<option value="top-right">top-right</option>
<option value="bottom">bottom</option>
<option value="bottom-left">bottom-left</option>
<option value="bottom-right">bottom-right</option>
<option value="left">left</option>
<option value="left-top">left-top</option>
<option value="left-bottom">left-bottom</option>
<option value="right">right</option>
<option value="right-top">right-top</option>
<option value="right-bottom">right-bottom</option>
<option value="inside">inside</option>
<option value="inside-top">inside-top</option>
<option value="inside-bottom">inside-bottom</option>
<option value="inside-left">inside-left</option>
<option value="inside-right">inside-right</option>
<option value="inside-top-right">inside-top-right</option>
<option value="inside-bottom-left">inside-bottom-left</option>
<option value="inside-bottom-right">inside-bottom-right</option>
</select>
</div>
</div>
<AgCharts options={options} />
</Fragment>
);
};
const root = createRoot(document.getElementById("root")!);
root.render(<ChartExample />);
{
axes: {
x: {
type: 'time',
crossLines: [
{
type: 'line',
value: new Date(2025, 9, 1),
label: { text: 'Launch', placement: 'left-top' },
},
],
},
y: {
type: 'number',
crossLines: [
{
type: 'range',
range: [180, 210],
label: { text: 'Baseline', placement: 'inside-top-left' },
},
],
},
},
}In this example:
- Use the checkboxes to show a
lineand arangeon each axis, and the dropdowns to change their placements. Each dropdown lists the placements that apply to that Cross Line. - The first part of a placement names the edge the label sits against, and the second positions it along that edge. For example,
top-leftsits above the Cross Line aligned to its left, whileleft-topsits beside its left edge aligned to its top. - Some placements apply to only one axis, such as
top-leftfor a y-axis line andleft-topfor an x-axis line. startandendresolve toleftandright, and are mirrored when RTL Layout is enabled.- Providing
placementas an ordered array lets the label fall back to the next placement when it collides or doesn't fit.
Fitting Long Labels Copy Link
There are a number of ways to handle long labels which do not fit within the series area or exceed a provided maxWidth or maxHeight.
import React, { useState, Fragment } from "react";
import { createRoot } from "react-dom/client";
import { AgCharts } from "ag-charts-react";
import {
AgCartesianChartOptions,
CrossLinesModule,
LineSeriesModule,
ModuleRegistry,
NumberAxisModule,
TextWrap,
TimeAxisModule,
} from "ag-charts-community";
import { getData } from "./data";
import clone from "clone";
ModuleRegistry.registerModules([
CrossLinesModule,
LineSeriesModule,
NumberAxisModule,
TimeAxisModule,
]);
const ChartExample = () => {
const [options, setOptions] = useState<AgCartesianChartOptions>({
data: getData(),
title: {
text: "Monthly Revenue",
},
series: [
{
type: "line",
xKey: "month",
yKey: "revenue",
yName: "Revenue",
},
],
axes: {
x: {
type: "time",
crossLines: [
{
type: "range",
range: [new Date(2025, 5, 1), new Date(2025, 7, 1)],
label: {
text: "Summer Promotion: Reduced Pricing in All Stores",
placement: "inside-top",
maxWidth: 120,
maxHeight: 60,
},
},
],
},
y: {
type: "number",
title: {
text: "Revenue (£k)",
},
crossLines: [
{
type: "line",
value: 250,
label: {
text: "Annual Revenue Target: £250k per Month",
placement: "top-left",
maxWidth: 120,
maxHeight: 60,
},
},
],
},
},
});
const setMaxWidth = (event: Event) => {
const nextOptions = clone(options);
const value = Number((event.target as HTMLInputElement).value);
document.getElementById("maxWidthValue")!.textContent = String(value);
nextOptions.axes!.x!.crossLines![0].label!.maxWidth = value;
nextOptions.axes!.y!.crossLines![0].label!.maxWidth = value;
setOptions(nextOptions);
};
const setMaxHeight = (event: Event) => {
const nextOptions = clone(options);
const value = Number((event.target as HTMLInputElement).value);
document.getElementById("maxHeightValue")!.textContent = String(value);
nextOptions.axes!.x!.crossLines![0].label!.maxHeight = value;
nextOptions.axes!.y!.crossLines![0].label!.maxHeight = value;
setOptions(nextOptions);
};
const setWrapping = (value: string) => {
const nextOptions = clone(options);
nextOptions.axes!.x!.crossLines![0].label!.wrapping = value as TextWrap;
nextOptions.axes!.y!.crossLines![0].label!.wrapping = value as TextWrap;
setOptions(nextOptions);
};
const setMinimumFontSize = (event: Event) => {
const nextOptions = clone(options);
const value = Number((event.target as HTMLInputElement).value);
document.getElementById("minimumFontSizeValue")!.textContent =
String(value);
nextOptions.axes!.x!.crossLines![0].label!.minimumFontSize = value;
nextOptions.axes!.y!.crossLines![0].label!.minimumFontSize = value;
setOptions(nextOptions);
};
const setTruncate = (value: string) => {
const nextOptions = clone(options);
nextOptions.axes!.x!.crossLines![0].label!.truncate = value === "enabled";
nextOptions.axes!.y!.crossLines![0].label!.truncate = value === "enabled";
setOptions(nextOptions);
};
return (
<Fragment>
<div className="example-controls">
<div className="controls-row">
<div className="gap-right">
<label htmlFor="maxWidthSlider">Max Width:</label>
<input
type="range"
id="maxWidthSlider"
min="40"
max="300"
defaultValue="120"
onInput={(event) => setMaxWidth(event)}
onChange={(event) => setMaxWidth(event)}
/>
<span
id="maxWidthValue"
style={{
display: "inline-block",
minWidth: "4ch",
textAlign: "right",
}}
>
120
</span>
</div>
<div className="gap-right">
<label htmlFor="maxHeightSlider">Max Height:</label>
<input
type="range"
id="maxHeightSlider"
min="10"
max="100"
defaultValue="60"
onInput={(event) => setMaxHeight(event)}
onChange={(event) => setMaxHeight(event)}
/>
<span
id="maxHeightValue"
style={{
display: "inline-block",
minWidth: "4ch",
textAlign: "right",
}}
>
60
</span>
</div>
<div>
<label htmlFor="minimumFontSizeSlider">Minimum Font Size:</label>
<input
type="range"
id="minimumFontSizeSlider"
min="6"
max="12"
defaultValue="12"
onInput={(event) => setMinimumFontSize(event)}
onChange={(event) => setMinimumFontSize(event)}
/>
<span
id="minimumFontSizeValue"
style={{
display: "inline-block",
minWidth: "3ch",
textAlign: "right",
}}
>
12
</span>
</div>
</div>
<div className="controls-row">
<div className="gap-right">
<label htmlFor="wrap-select">Wrapping:</label>
<select
id="wrap-select"
onChange={(event) => setWrapping(event.target.value)}
>
<option value="on-space">on-space (default)</option>
<option value="always">always</option>
<option value="hyphenate">hyphenate</option>
<option value="never">never</option>
</select>
</div>
<div>
<label htmlFor="truncate-select">Truncate:</label>
<select
id="truncate-select"
onChange={(event) => setTruncate(event.target.value)}
>
<option value="enabled">Enabled (default)</option>
<option value="disabled">Disabled</option>
</select>
</div>
</div>
</div>
<AgCharts options={options} />
</Fragment>
);
};
const root = createRoot(document.getElementById("root")!);
root.render(<ChartExample />);
{
crossLines: [
{
type: 'range',
range: [new Date(2025, 5, 1), new Date(2025, 7, 1)],
label: {
text: 'Summer Promotion: Reduced Pricing in All Stores',
placement: 'inside-top',
maxWidth: 120,
maxHeight: 60,
},
},
],
}In this example:
- Use the controls to see how the labels wrap, shrink and truncate.
- A label that exceeds
maxWidthormaxHeightor does not fit within the series area, wraps according towrapping, shrinks towardsminimumFontSize, then is truncated iftruncateis enabled. See Series Label Collision Avoidance for details.
Polar Axes Cross Lines Copy Link
Cross Lines are also available for Polar Axes. They share the line and range options of Cartesian Cross Lines, but the label options differ by axis: radius axis labels are positioned with positionAngle, and angle axis labels support the common label options only.
Polar Cross Lines are not included in CrossLinesModule. Register PolarCrossLinesModule separately when using module imports.
import React, { useState } from "react";
import { createRoot } from "react-dom/client";
import { AgCharts } from "ag-charts-react";
import {
AgChartOptions,
AngleCategoryAxisModule,
AnimationModule,
ContextMenuModule,
CrosshairModule,
LegendModule,
ModuleRegistry,
PolarCrossLinesModule,
RadarLineSeriesModule,
RadiusNumberAxisModule,
} from "ag-charts-enterprise";
import { getData } from "./data";
ModuleRegistry.registerModules([
AngleCategoryAxisModule,
AnimationModule,
CrosshairModule,
PolarCrossLinesModule,
LegendModule,
RadarLineSeriesModule,
RadiusNumberAxisModule,
ContextMenuModule,
]);
const ChartExample = () => {
const [options, setOptions] = useState<AgChartOptions>({
data: getData(),
title: {
text: "Skill Analysis",
},
series: [
{
type: "radar-line",
angleKey: "skill",
radiusKey: "value",
},
],
axes: {
angle: {
type: "angle-category",
shape: "circle",
crossLines: [
{
type: "range",
range: ["Technical Skills", "Communication"],
label: {
text: "Valuable Skills",
},
},
],
},
radius: {
type: "radius-number",
shape: "circle",
crossLines: [
{
type: "line",
value: 6,
stroke: "red",
label: {
text: "Minimal\nRequirement",
positionAngle: 180,
},
},
],
},
},
});
return <AgCharts options={options} />;
};
const root = createRoot(document.getElementById("root")!);
root.render(<ChartExample />);
{
axes: {
angle: {
type: 'angle-category',
shape: 'circle',
crossLines: [
{
type: 'range',
range: ['Technical Skills', 'Communication'],
label: {
text: 'Valuable Skills',
},
},
],
},
radius: {
type: 'radius-number',
shape: 'circle',
crossLines: [
{
type: 'line',
stroke: 'red',
value: 6,
label: {
text: 'Minimal\nRequirement',
positionAngle: 180,
},
},
],
},
},
} Theming Cross Lines Copy Link
Theme overrides style every Cross Line on an axis type. Add a line or range object to style only the Cross Lines of that type.
{
theme: {
overrides: {
common: {
axes: {
number: {
crossLines: {
strokeWidth: 2,
line: { stroke: '#d62728', lineDash: [4, 4] },
range: { fill: '#7290C4', fillOpacity: 0.2 },
},
},
},
},
},
},
}In this configuration:
strokeWidthapplies to every Cross Line.- The
lineandrangeoptions take precedence over the options for every Cross Line, and options set on a Cross Line take precedence over both.
API Reference Copy Link
- type required
'line' - Renders the Cross Line as a single line positioned at `value`.
- value required
AxisValue - The data value at which the line should be positioned.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgCartesianCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'line' - Renders the Cross Line as a single line positioned at `value`.
- value required
AxisValue - The data value at which the line should be positioned.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgCartesianCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'range' - Renders the Cross Line as a shaded band spanning `range`.
- range required
[AxisValue, AxisValue] - The `[start, end]` data values bounding the shaded region.
- fill
AgCssColorOrRef - The colour to use for the fill of the range. A colour string, or a theme-colour reference object.
- fillOpacity
Opacity - The opacity of the fill for the range.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgCartesianCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'range' - Renders the Cross Line as a shaded band spanning `range`.
- range required
[AxisValue, AxisValue] - The `[start, end]` data values bounding the shaded region.
- fill
AgCssColorOrRef - The colour to use for the fill of the range. A colour string, or a theme-colour reference object.
- fillOpacity
Opacity - The opacity of the fill for the range.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgCartesianCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'line' - Renders the Cross Line as a single line positioned at `value`.
- value required
AxisValue - The data value at which the line should be positioned.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgBaseCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'line' - Renders the Cross Line as a single line positioned at `value`.
- value required
AxisValue - The data value at which the line should be positioned.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgBaseCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'range' - Renders the Cross Line as a shaded band spanning `range`.
- range required
[AxisValue, AxisValue] - The `[start, end]` data values bounding the shaded region.
- fill
AgCssColorOrRef - The colour to use for the fill of the range. A colour string, or a theme-colour reference object.
- fillOpacity
Opacity - The opacity of the fill for the range.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgBaseCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'range' - Renders the Cross Line as a shaded band spanning `range`.
- range required
[AxisValue, AxisValue] - The `[start, end]` data values bounding the shaded region.
- fill
AgCssColorOrRef - The colour to use for the fill of the range. A colour string, or a theme-colour reference object.
- fillOpacity
Opacity - The opacity of the fill for the range.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgBaseCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'line' - Renders the Cross Line as a single line positioned at `value`.
- value required
AxisValue - The data value at which the line should be positioned.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgRadiusCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'line' - Renders the Cross Line as a single line positioned at `value`.
- value required
AxisValue - The data value at which the line should be positioned.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgRadiusCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'range' - Renders the Cross Line as a shaded band spanning `range`.
- range required
[AxisValue, AxisValue] - The `[start, end]` data values bounding the shaded region.
- fill
AgCssColorOrRef - The colour to use for the fill of the range. A colour string, or a theme-colour reference object.
- fillOpacity
Opacity - The opacity of the fill for the range.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgRadiusCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.
- type required
'range' - Renders the Cross Line as a shaded band spanning `range`.
- range required
[AxisValue, AxisValue] - The `[start, end]` data values bounding the shaded region.
- fill
AgCssColorOrRef - The colour to use for the fill of the range. A colour string, or a theme-colour reference object.
- fillOpacity
Opacity - The opacity of the fill for the range.
- id
string - A user-supplied identifier for the Cross Line, surfaced as `crossLineId` in callback and event params. Defaults to an internally generated identifier.
- enabled
boolean - Whether to show the Cross Line.
- stroke
AgCssColorOrRef - The colour of the stroke for the lines. A colour string, or a theme-colour reference object.
- strokeWidth
PixelSize - The width in pixels of the stroke for the lines.
- strokeOpacity
Opacity - The opacity of the stroke for the lines.
- lineDash
PixelSize[] - Defines how the line stroke is rendered. Every number in the array specifies the length in pixels of alternating dashes and gaps. For example, `[6, 3]` means dashes with a length of `6` pixels with gaps between of `3` pixels.
- label
AgRadiusCrossLineLabelOptions - Configuration for the Cross Line label.
- listeners
AgCrossLineListeners - A map of event names to listeners.