Title Config
Configure the chart title.
- Validation: should be an object with any of the properties {
align,alignedToAxes,backgroundStyle,link,linkDisabled,margin,padding,position,prefix,suffix,text,textBackgroundStyle,textMargin,textPadding,textStyle,truncation,verticalAlign,verticalExpand}
Every property is optional and falls back to its default. Property anchors are stable: link to any entry as #title.propertyName, and to a member of a nested property as #title.propertyName.memberName.
align
The alignment for the title (left, center, right).
- Default:
"center" - Validation:
should be one of [ "left", "center", "right" ] - Used in: Chart title
alignedToAxes
Whether the title should be aligned between the axes (true) or the chart bounds (false).
- Default:
true - Validation:
should be a boolean - Used in: Chart title
backgroundStyle
The styles to apply to the title background (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none)).
- Default:
{ strokeColor: "currentColor", strokeOpacity: 0, strokeWidth: null, strokeDashArray: null, fillColor: null, fillOpacity: 0 } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Chart title · Truncated Text
backgroundStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
null - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title · Truncated Text
backgroundStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Chart title · Truncated Text
backgroundStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title · Truncated Text
backgroundStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
backgroundStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Chart title · Truncated Text
backgroundStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
null - Validation:
should be a number >= to 0 or be equal to null - Used in: Chart title · Truncated Text
link
The link to create for the title (use null for none).
- Default:
null - Validation:
should be a string or be equal to null - Used in: A caption under the chart
linkDisabled
Whether to prevent default navigation behaviour when the link is clicked.
- Default:
false - Validation:
should be a boolean - Used in: A caption under the chart
margin
The margin (in pixels) for the top, right, bottom and left sides of the title.
- Default:
{ top: 0, right: 0, bottom: 5, left: 0 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Chart title · Truncated Text
margin.bottom
The space (in pixels) along the bottom edge.
- Default:
5 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
margin.left
The space (in pixels) along the left edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
margin.right
The space (in pixels) along the right edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
margin.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
padding
The padding (in pixels) for the top, right, bottom and left sides of the title.
- Default:
{ top: 0, right: 0, bottom: 5, left: 0 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Chart title · Truncated Text
padding.bottom
The space (in pixels) along the bottom edge.
- Default:
5 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
padding.left
The space (in pixels) along the left edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
padding.right
The space (in pixels) along the right edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
padding.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
position
The position of the title relative to the chart (top or bottom).
- Default:
"top" - Validation:
should be one of [ "top", "bottom" ] - Used in: A caption under the chart
prefix
The prefix box shown at the start of the title.
- Default:
{ text: null, margin: { … }, padding: { … }, backgroundStyle: { … }, textStyle: { … } } - Validation: should be an object with any of the properties {
backgroundStyle,margin,padding,text,textStyle} - Used in: Chart title · Truncated Text
prefix.backgroundStyle
The styles to apply to the box background (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none)).
- Default:
{ strokeColor: "currentColor", strokeOpacity: 0, strokeWidth: null, strokeDashArray: null, fillColor: null, fillOpacity: 0 } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Chart title · Truncated Text
prefix.backgroundStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
null - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title · Truncated Text
prefix.backgroundStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Chart title · Truncated Text
prefix.backgroundStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Truncated Text
prefix.backgroundStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
prefix.backgroundStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Truncated Text
prefix.backgroundStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
null - Validation:
should be a number >= to 0 or be equal to null - Used in: Truncated Text
prefix.margin
The margin (in pixels) for the top, right, bottom and left sides of the box.
- Default:
{ top: 0, right: 5, bottom: 0, left: 0 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Truncated Text
prefix.margin.bottom
The space (in pixels) along the bottom edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Truncated Text
prefix.margin.left
The space (in pixels) along the left edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Truncated Text
prefix.margin.right
The space (in pixels) along the right edge.
- Default:
5 - Validation:
should be a number >= to 0 - Used in: Truncated Text
prefix.margin.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Truncated Text
prefix.padding
The padding (in pixels) for the top, right, bottom and left sides of the box.
- Default:
{ top: 0, right: 5, bottom: 0, left: 0 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Chart title · Truncated Text
prefix.padding.bottom
The space (in pixels) along the bottom edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
prefix.padding.left
The space (in pixels) along the left edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
prefix.padding.right
The space (in pixels) along the right edge.
- Default:
5 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
prefix.padding.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
prefix.text
The text to display in the box (use null for none).
- Default:
null - Validation:
should be a string or be equal to null - Used in: Chart title · Truncated Text
prefix.textStyle
The styles to apply to the box text (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none), use "currentColor" to follow the host page's css color and theme).
- Default:
{ strokeColor: "none", strokeOpacity: null, strokeWidth: 0, strokeDashArray: null, fillColor: "currentColor", fillOpacity: null } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Chart title
prefix.textStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title
prefix.textStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
null - Validation:
should be a number >= to 0 and <= 1 or be equal to null
prefix.textStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"none" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null
prefix.textStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
prefix.textStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
null - Validation:
should be a number >= to 0 and <= 1 or be equal to null
prefix.textStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 or be equal to null
suffix
The suffix box shown at the end of the title.
- Default:
{ text: null, margin: { … }, padding: { … }, backgroundStyle: { … }, textStyle: { … } } - Validation: should be an object with any of the properties {
backgroundStyle,margin,padding,text,textStyle} - Used in: Chart title · Truncated Text
suffix.backgroundStyle
The styles to apply to the box background (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none)).
- Default:
{ strokeColor: "currentColor", strokeOpacity: 0, strokeWidth: null, strokeDashArray: null, fillColor: null, fillOpacity: 0 } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Truncated Text
suffix.backgroundStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
null - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Truncated Text
suffix.backgroundStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Truncated Text
suffix.backgroundStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Truncated Text
suffix.backgroundStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
suffix.backgroundStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Truncated Text
suffix.backgroundStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
null - Validation:
should be a number >= to 0 or be equal to null - Used in: Truncated Text
suffix.margin
The margin (in pixels) for the top, right, bottom and left sides of the box.
- Default:
{ top: 0, right: 0, bottom: 0, left: 5 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Truncated Text
suffix.margin.bottom
The space (in pixels) along the bottom edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Truncated Text
suffix.margin.left
The space (in pixels) along the left edge.
- Default:
5 - Validation:
should be a number >= to 0 - Used in: Truncated Text
suffix.margin.right
The space (in pixels) along the right edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Truncated Text
suffix.margin.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Truncated Text
suffix.padding
The padding (in pixels) for the top, right, bottom and left sides of the box.
- Default:
{ top: 0, right: 0, bottom: 0, left: 5 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Chart title · Truncated Text
suffix.padding.bottom
The space (in pixels) along the bottom edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
suffix.padding.left
The space (in pixels) along the left edge.
- Default:
5 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
suffix.padding.right
The space (in pixels) along the right edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
suffix.padding.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
suffix.text
The text to display in the box (use null for none).
- Default:
null - Validation:
should be a string or be equal to null - Used in: Chart title · Truncated Text
suffix.textStyle
The styles to apply to the box text (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none), use "currentColor" to follow the host page's css color and theme).
- Default:
{ strokeColor: "none", strokeOpacity: null, strokeWidth: 0, strokeDashArray: null, fillColor: "currentColor", fillOpacity: null } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Chart title
suffix.textStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title
suffix.textStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
null - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Chart title
suffix.textStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"none" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null
suffix.textStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
suffix.textStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
null - Validation:
should be a number >= to 0 and <= 1 or be equal to null
suffix.textStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 or be equal to null
text
The text to display in the title (use null for none).
- Default:
null - Validation:
should be a string or be equal to null - Used in: Home · Getting started · Staged animation · Stacked · Grouped · Grouped Across Axes · +58 more
textBackgroundStyle
The styles to apply to the title text background (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none)).
- Default:
{ strokeColor: "currentColor", strokeOpacity: 0, strokeWidth: null, strokeDashArray: null, fillColor: null, fillOpacity: 0 } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Chart title · Truncated Text
textBackgroundStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
null - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title · Truncated Text
textBackgroundStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Chart title · Truncated Text
textBackgroundStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Truncated Text
textBackgroundStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
textBackgroundStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Truncated Text
textBackgroundStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
null - Validation:
should be a number >= to 0 or be equal to null - Used in: Truncated Text
textMargin
The margin (in pixels) for the top, right, bottom and left sides of the title text.
- Default:
{ top: 0, right: 0, bottom: 0, left: 0 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Chart title · Truncated Text
textMargin.bottom
The space (in pixels) along the bottom edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textMargin.left
The space (in pixels) along the left edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textMargin.right
The space (in pixels) along the right edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textMargin.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textPadding
The padding (in pixels) for the top, right, bottom and left sides of the title text.
- Default:
{ top: 0, right: 0, bottom: 0, left: 0 } - Validation: should be an object with any of the properties {
bottom,left,right,top} - Used in: Chart title · Truncated Text
textPadding.bottom
The space (in pixels) along the bottom edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textPadding.left
The space (in pixels) along the left edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textPadding.right
The space (in pixels) along the right edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textPadding.top
The space (in pixels) along the top edge.
- Default:
0 - Validation:
should be a number >= to 0 - Used in: Chart title · Truncated Text
textStyle
The styles to apply to the title text (strokeColor, strokeOpacity, strokeWidth, fillColor, fillOpacity (use null for none), use "currentColor" to follow the host page's css color and theme).
- Default:
{ strokeColor: "none", strokeOpacity: null, strokeWidth: 0, strokeDashArray: null, fillColor: "currentColor", fillOpacity: null } - Validation: should be an object with any of the properties {
fillColor,fillOpacity,strokeColor,strokeDashArray,strokeOpacity,strokeWidth} - Used in: Chart title
textStyle.fillColor
The color of the fill: use null to leave the svg fill attribute unset so that css can supply it, "none" to switch the fill off, or "currentColor" to follow the host page's css color.
- Default:
"currentColor" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null - Used in: Chart title
textStyle.fillOpacity
The opacity (0 - 1) of the fill, or null to leave the svg fill-opacity attribute unset.
- Default:
null - Validation:
should be a number >= to 0 and <= 1 or be equal to null - Used in: Chart title
textStyle.strokeColor
The color of the stroke (outline): use null to leave the svg stroke attribute unset so that css can supply it, "none" to switch the stroke off, or "currentColor" to follow the host page's css color.
- Default:
"none" - Validation:
should be a valid svg color (or "none" / "currentColor") or be equal to null
textStyle.strokeDashArray
The dash array pattern of the stroke (e.g. "5, 5"), or null for a solid stroke.
- Default:
null - Validation:
should be a valid dash array or be equal to null
textStyle.strokeOpacity
The opacity (0 - 1) of the stroke, or null to leave the svg stroke-opacity attribute unset.
- Default:
null - Validation:
should be a number >= to 0 and <= 1 or be equal to null
textStyle.strokeWidth
The width (in pixels) of the stroke, or null to leave the svg stroke-width attribute unset.
- Default:
0 - Validation:
should be a number >= to 0 or be equal to null
truncation
The truncation applied to the title when its width exceeds the width of the chart.
- Default:
{ enabled: true, text: "…", tooltipEnabled: true } - Validation: should be an object with any of the properties {
enabled,text,tooltipEnabled} - Used in: Chart title · Truncated Text
truncation.enabled
Whether to use text truncation when the title width exceeds the width of the chart.
- Default:
true - Validation:
should be a boolean - Used in: Chart title · Truncated Text
truncation.text
The truncation text to append when text is truncated.
- Default:
"…" - Validation:
should be a string - Used in: Chart title · Truncated Text
truncation.tooltipEnabled
Whether truncated text shows its full string as the browser’s native tooltip while a pointer rests on it.
When true, a truncated title carries an svg <title> holding the full text, which browsers show as their native tooltip (not the chart tooltip) while a mouse or pen rests on it. Touch has no hover, so nothing shows there; the chart’s accessible name already uses the full text.
- Default:
true - Validation:
should be a boolean
verticalAlign
The vertical alignment of the prefix/text/suffix within the title (top, middle, bottom).
- Default:
"middle" - Validation:
should be one of [ "top", "middle", "bottom" ] - Used in: Chart title · Truncated Text
verticalExpand
Whether to expand the padding height of the prefix/text/suffix to match the max section height.
- Default:
false - Validation:
should be a boolean - Used in: Chart title