SheetXL - v1.0.2
    Preparing search index...

    Variable ChartElementConst

    ChartElement: NamedExoticComponent<
        Omit<ChartElementProps, "ref"> & RefAttributes<IChartElement>,
    > = ...

    Draws a chart, anywhere: a div the chart fills.

    The chart is laid out at the box's unzoomed px (IChart.getLayout) and painted as laid out, so the same chart in two elements is drawn twice, each at its own size. It is laid out again when the box is resized and whenever the chart says its layout may have changed (onLayoutChange: an edit, a cell it plots, a font arriving). The painter is loaded on the first mount through ChartPaint; a chart with no model (a cx: chart) draws nothing.

    Nothing of a sheet or a movable is needed: ChartEditor is this element inside a movable's frame, and a chart made with createChart draws from its own JSON. The chart may be given as a Promise (the one getCharts().add answers, say); onChartChange hands the app the chart once it is there.

    A press inside the chart is hit-tested against the layout painted (IChart.getElementAt), and with a ChartElementProps.selection selects what is pressed, Excel's way; the selected elements are outlined over the chart.