Skip to content

Function: newPlot() ​

ts
function newPlot(el, dataOrFigure?, layout?, config?, options?): Promise<Chart>;

Draw a new chart in el, replacing any chart already there. Resolves after the first frame.

Parameters ​

ParameterType
elHTMLElement
dataOrFigure?| FigureInput<object, LayoutInput> | readonly object[]
layout?LayoutInput
config?Config
options?ChartOptions

Returns ​

Promise<Chart>

Released under the MIT License.