in packages/synchro-charts/src/testing/test-routes/charts/shaders/sc-bar-chart/sc-multiple-bars.tsx [39:82]
componentDidLoad() {
const container = this.el.querySelector('#test-container') as HTMLDivElement;
const scene = chartScene({
viewport: {
start: X_MIN,
end: X_MAX,
yMin: Y_MIN,
yMax: Y_MAX,
},
dataStreams: [
{
id: 'test-stream',
name: 'test-stream-name',
color: 'black',
aggregates: { [HOUR_IN_MS * 5]: [TEST_DATA_POINT_1] },
data: [],
resolution: HOUR_IN_MS * 5,
dataType: DataType.NUMBER,
},
{
id: 'test-stream-2',
name: 'test-stream-name-2',
color: 'red',
aggregates: { [HOUR_IN_MS * 5]: [TEST_DATA_POINT_2] },
data: [],
resolution: HOUR_IN_MS * 5,
dataType: DataType.NUMBER,
},
],
container,
chartSize: CHART_SIZE,
minBufferSize: 100,
bufferFactor: 2,
thresholdOptions: {
showColor: false,
},
thresholds: [],
});
webGLRenderer.addChartScene({ manager: scene });
const rect = container.getBoundingClientRect() as DOMRect;
webGLRenderer.setChartRect(scene.id, { density: 1, ...rect.toJSON() });
}