Skip to content

Function: setDefaultTemplate() ​

ts
function setDefaultTemplate(name): ChartRegistry;

Set the template the shared registry applies when layout.template is unset: a registered name, or undefined for none. Figures that set layout.template are unaffected. Apps migrating from Plotly call it once, before creating charts, to keep Plotly's look:

ts
import { setDefaultTemplate } from '@mk7s/holochart';
setDefaultTemplate('plotly-classic');

Parameters ​

ParameterType
namestring | undefined

Returns ​

ChartRegistry

Released under the MIT License.