Methodician commented on issue #15488:
URL: https://github.com/apache/echarts/issues/15488#issuecomment-1036308337
Found a workable work-around for folks in a similar situation to me...
My sensors emit data every 5 minutes, so I'm rounding the time to the
nearest 5 minutes and it works like a charm.
I map through the readouts for each sensor to create my series. Here is some
example code to get you started:
`
const moduleSeries = modulesWithReadouts.map(({ name, readouts }) => {
const series: SeriesOption = {
name,
type: 'line',
data: readouts.map((readout: any) => {
const coeff = 1000 * 60 * 5; // 5 minutes
return [
new Date(Math.round(readout.timestamp / coeff) * coeff),
readout.temperature,
];
}),
};
return series;
});
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]