mirror of
https://github.com/owncast/owncast.git
synced 2024-11-29 11:39:08 +03:00
Do not format date, just pass raw date object to chart. Closes https://github.com/owncast/owncast/issues/459
This commit is contained in:
parent
69f8efba94
commit
59eb6eaa16
1 changed files with 1 additions and 2 deletions
|
@ -19,8 +19,7 @@ function createGraphDataset(dataArray) {
|
||||||
const dataValues = {};
|
const dataValues = {};
|
||||||
dataArray.forEach(item => {
|
dataArray.forEach(item => {
|
||||||
const dateObject = new Date(item.time);
|
const dateObject = new Date(item.time);
|
||||||
const dateString = `${dateObject.getFullYear() }-${ dateObject.getMonth() }-${ dateObject.getDay() } ${ dateObject.getHours() }:${ dateObject.getMinutes()}`;
|
dataValues[dateObject] = item.value;
|
||||||
dataValues[dateString] = item.value;
|
|
||||||
})
|
})
|
||||||
return dataValues;
|
return dataValues;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue