View as Markdown

API reference: @salmonui/charts/gauge

GaugeApiinterface

import type { GaugeApi } from '@salmonui/charts/gauge';
interface GaugeApi {
    readonly element: HTMLElement | null;
    export(options?: GaugeExportOptions): Promise<void>;
    toBlob(format?: 'png' | 'jpeg' | 'svg'): Promise<Blob>;
    toDataURL(format?: 'png' | 'jpeg' | 'svg'): Promise<string>;
    toSVGString(): string;
    print(): Promise<void>;
    focus(): void;
}

Instance reached through ref.

GaugeApi members (7)
NameSignatureDescription
elementreadonly element: HTMLElement | null;
exportexport(options?: GaugeExportOptions): Promise<void>;
toBlobtoBlob(format?: 'png' | 'jpeg' | 'svg'): Promise<Blob>;
toDataURLtoDataURL(format?: 'png' | 'jpeg' | 'svg'): Promise<string>;
toSVGStringtoSVGString(): string;
printprint(): Promise<void>;
focusfocus(): void;

Focuses the first slider thumb (draggable pointer or range end).