Do not format date, just pass raw date object to chart. Closes https://github.com/owncast/owncast/issues/459
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user