Open ZeRego opened 2 months ago
I want to render in the server a react page that includes a Vega chart. Is this possible?
At the moment the example code only returns an empty div.
<div style="width:100%;height:100%;min-height:300px"/>
Server
const html = renderToStaticMarkup(<VegaViz spec={vegaSpec}/>);
Component
const VegaViz = ({spec}: { spec: vega.Spec }) => { return ( <Vega style={{ width: '100%', height: '100%', minHeight: 300, }} spec={spec} renderer={'svg'} /> ); };
I want to render in the server a react page that includes a Vega chart. Is this possible?
At the moment the example code only returns an empty div.
<div style="width:100%;height:100%;min-height:300px"/>
Server
Component