in packages/synchro-charts/src/testing/test-routes/charts/shaders/status-timeline/single-colored-status.tsx [27:64]
componentDidLoad() {
const container = this.el.querySelector('#test-container') as HTMLDivElement;
const scene = chartScene({
alarms: { expires: DAY_IN_MS },
viewport: {
start: X_MIN,
end: X_MAX,
yMin: 0,
yMax: HEIGHT,
},
dataStreams: [
{
id: 'test-stream',
name: 'test-stream-name',
color: 'red',
aggregates: {
[DAY_IN_MS]: [TEST_DATA_POINT_1],
},
data: [],
resolution: DAY_IN_MS,
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() });
}