import { ChartOptions , SceneNode , DataFrame } from '@chart-parts/interfaces' ; import { ChartOptionsManager } from '../api/ChartOptionsManager' ; import { SceneFrame } from './context/SceneFrame' ; import { GeneratedScenegraph } from './interfaces' ; import { processNode } from './processNode' ; category param root param data param options returns export function createScenegraph ( root , data , options ) { const optionsManager = new ChartOptionsManager ( options ) ; const width = optionsManager . chartSpace . shape . width as number ; const height = optionsManager . chartSpace . shape . height as number ; const rootFrame = new SceneFrame ( undefined as any , undefined , data , { width , height , } ) ; return { root : processNode ( root , rootFrame ) [ 0 ] , channelHandlers : rootFrame . channelHandlers , } ; }