Chart Configuration Options
Thechart option controls the rendering container, dimensions, appearance, and behavior of the chart itself.
Source: ts/Core/Chart/ChartOptions.ts
Basic Configuration
Rendering Options
chart.type
string
default:"line"
Default series type for the chart
chart.renderTo
string | HTMLElement
The HTML element where the chart will be rendered
chart.width
number | null
Explicit pixel width of the chart. If null, uses container width.
chart.height
number | null
Explicit pixel height of the chart. If null, uses container height or defaults to 400px.
Appearance Options
chart.backgroundColor
ColorType
default:"#ffffff"
Background color or gradient for the outer chart area
chart.borderWidth
number
default:"0"
Width of the outer chart border in pixels
chart.borderColor
ColorType
default:"#335cad"
Color of the outer chart border
chart.borderRadius
number
default:"0"
Corner radius of the outer chart border
chart.plotBackgroundColor
ColorType
Background color for the plot area (where the data is rendered)
chart.plotBorderWidth
number
default:"0"
Width of the plot area border
chart.plotBorderColor
ColorType
default:"#cccccc"
Color of the plot area border
chart.className
string
CSS class name to apply to the chart container
Spacing & Margins
chart.margin
number | [number, number, number, number]
Margin around the chart. Can be a single number or array [top, right, bottom, left]
chart.marginTop
number
Top margin in pixels
chart.marginRight
number
Right margin in pixels
chart.marginBottom
number
Bottom margin in pixels
chart.marginLeft
number
Left margin in pixels
chart.spacing
[number, number, number, number]
default:"[10, 10, 15, 10]"
Space between the chart border and the plot area [top, right, bottom, left]
Interaction Options
chart.animation
boolean | AnimationOptions
default:"true"
Enable or configure chart animations
chart.reflow
boolean
default:"true"
Whether to reflow the chart when the window is resized
chart.panning
boolean | object
default:"false"
Enable panning in the chart
chart.zooming
object
Zooming configuration
chart.events
object
Event handlers for chart-level events
ts/Core/Chart/ChartOptions.ts:83
3D Options
chart.options3d
object
3D chart configuration
Advanced Options
chart.inverted
boolean
default:"false"
Whether to invert the axes so X is vertical and Y is horizontal
chart.polar
boolean
default:"false"
Whether the chart is a polar chart
chart.alignTicks
boolean
default:"true"
Whether to align tick marks on multiple axes
chart.ignoreHiddenSeries
Whether hidden series should affect axis extremes
chart.parallel Coordinates
boolean
default:"false"
Enable parallel coordinates chart type
chart.scrollablePlotArea
object
Make the plot area scrollable for large datasets
Export & Print Options
chart.printMaxWidth
number
default:"780"
Maximum width for the chart when printing
Complete Example
See Also
- Chart Class API - Chart methods and properties
- Responsive Options - Responsive configuration
- Events API - Chart events
- Series Options - Series configuration