View as Markdown

API reference: @salmonui/charts/server

visualizationSvgfunction

import { visualizationSvg } from '@salmonui/charts/server';
function visualizationSvg(html: string, options?: VisualizationSvgOptions): string;

Standalone SVG markup of the first visualization in server-rendered HTML (renderToStaticMarkup(<Chart ... />)): the drawing of the plot surface (or the root <svg> of Sparkline, Barcode and QRCode), with xmlns, theme colors resolved and the chrome styled. Empty when there is no SVG.