Typing note: In SceneLayer, data and options are unknown for chart / chartComparison / chartCombo — you are responsible for shapes that match ChartCreator. See Charts overview and per-chart guides under 03-feature-guides/charts/.
1{2type:"chart",3chartType:"bar",4data:[5/* BarChartData[] from the bar chart guide */6],7options:{8/* BarChartOptions */9},10x:32,11y:200,12width:700,13height:380,14}
1{2type:"chartComparison",3options:{4// ComparisonChartOptions — see docs/03-feature-guides/charts/10-chart-comparison.mdx5title:"Plan vs actual",6// …series, dimensions, appearance…7},8x:0,9y:420,10width:900,11height:320,12opacity:1,13}
1constlayers=[2{3type:"chartComparison"asconst,4options:{/* first comparison config */},5x:0,6y:0,7width:480,8height:300,9},10{11type:"chartComparison"asconst,12options:{/* second comparison config */},13x:500,14y:0,15width:480,16height:300,17},18];
1{2type:"chartCombo",3options:{4// ComboChartOptions — see charts/09-chart-combo5},6x:40,7y:500,8width:880,9height:360,10}
#Caching pattern (heavy static charts)
Each chart layer re-renders the chart on every render(). If the chart is static, pre-render with createChart once, then use imageBuffer instead of chart: