ChartArea

23 Sep 20251 minute to read

The ChartArea class provides properties to customize the appearance and layout of the chart’s display area.

Properties

background string

The background property accepts both hex color codes and rgba color values for customizing the chart area’s background.

Defaults to ‘transparent’

backgroundImage string

The background image of the chart area, specified as a URL or local image path.

Defaults to null

border BorderModel

Options to customize the border of the chart area.

margin MarginModel

Defines the margin options for the chart area, specifying the space between the chart container and the chart area.
The margin object can customize the left, right, top, and bottom margins.

Defaults to {left: 0, right: 0, top: 0, bottom: 0}

opacity number

The opacity property controls the transparency of the background of the chart area.

Defaults to 1

width string

Defines the width of the chart area element.
Accepts values in percentage or pixels.

Defaults to null