Function: fetchChart()
fetchChart(
chartId,options):Promise<{chartId:string;error?:string;result?: {chartType:"custom"|"bar"|"horizontalBar"|"line"|"area"|"combo"|"waterfall"|"scatter"|"heatmap"|"radar"|"pie"|"funnel"|"treemap";option:Record<string,unknown>; }; } |undefined>
Long-poll the chart cache until the entry settles (result or
error set), the entry is missing, or the server-side timeout
elapses.
Returns:
- the resolved Chart when it settled, errored, or
stayed in processing past
timeoutMs(so the client can re-poll); undefinedwhen the entry is missing, expired, or owned by another identity (the consumer should treat as 404).
signal lets the caller cancel ahead of timeout (e.g. the HTTP
request closed). Cancellation propagates to the inter-poll sleep
so the helper returns immediately.
Parameters
Section titled “Parameters”chartId
Section titled “chartId”string
options
Section titled “options”Returns
Section titled “Returns”Promise<{ chartId: string; error?: string; result?: { chartType: "custom" | "bar" | "horizontalBar" | "line" | "area" | "combo" | "waterfall" | "scatter" | "heatmap" | "radar" | "pie" | "funnel" | "treemap"; option: Record<string, unknown>; }; } | undefined>