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
@ -19,8 +19,7 @@ function createGraphDataset(dataArray) {
|
||||
const dataValues = {};
|
||||
dataArray.forEach(item => {
|
||||
const dateObject = new Date(item.time);
|
||||
const dateString = `${dateObject.getFullYear() }-${ dateObject.getMonth() }-${ dateObject.getDay() } ${ dateObject.getHours() }:${ dateObject.getMinutes()}`;
|
||||
dataValues[dateString] = item.value;
|
||||
dataValues[dateObject] = item.value;
|
||||
})
|
||||
return dataValues;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user