docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Create a small helper that prepares the plotting library to use a custom trace module and locale before rendering charts.
demo_trace and an optional transform module named demo_transform, calling preparePlotting followed by renderCustomChart renders data using those identifiers on the first trace without throwing. @testpreparePlotting is called with a locale named xx-demo, the figure returned by renderCustomChart reports that locale on its layout/config and formats axis tick labels with the locale's month/day names. @testpreparePlotting twice with the same modules and locale does not register duplicates or change the resulting figure; both renders keep the custom trace type and locale intact. @test/**
* Registers a custom trace module, optional transform module, and locale definition with the plotting library.
* Uses the provided locale as the default for subsequent renders.
*/
export async function preparePlotting(options: {
traceModule: object;
transformModule?: object;
locale: {
name: string;
dictionary?: Record<string, string>;
format: Record<string, unknown>;
};
defaultLocale?: string;
}): Promise<void>;
/**
* Renders a chart into the target container using the registered trace type and locale.
* Returns the plotting element so its data/layout/config can be inspected.
*/
export async function renderCustomChart(
target: HTMLElement,
data: object[],
layout?: object,
configOverrides?: object
): Promise<HTMLElement>;Interactive charting library for building browser-based charts.