OptionalcolorWhether the chart is drawn light or dark. Dark, its colors are drawn as a dark grid draws its
cells. A chart area with no fill of its own is the surface's background
(--sxl-color-base-100) in either mode.
OptionalheightThe element's height, as style.height; a number as the box's height.
OptionalonCalled with the chart once ChartElementProps.chart resolves, and again whenever a new
input resolves to a different one. Until the first input resolves, or if an input fails, the
chart is null.
OptionalonCalled on a press inside the chart with what is under the pointer, before the selection (if any) changes.
OptionalrefOptionalselectionThe selection a press inside the chart changes, and whose selected elements are outlined: the
sheet view's (getChartElementSelection) for a chart on a sheet, or one made for the chart
(new ChartElementSelection({ chart })). Without one, a press selects nothing.
OptionalwidthThe element's width, as style.width; by default the element fills its parent. A number is
taken as the box's width without waiting to measure it.
OptionalzoomThe scale the chart is drawn at, where 1 is unscaled: the element's box is measured at the
scale and the chart laid out at the unscaled size.
The chart to draw: one in a workbook, or one made outside it with
createChart, or aPromisefor either. A promise draws nothing until it resolves and shows the error if it rejects; while a later promise resolves, the chart already drawn is kept.This can be accessed (once resolved) via the element ref.