Skip to content

Commit

Permalink
remove timestamp param from date
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Aug 20, 2024
1 parent 0ae80a0 commit ddab4bc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,16 @@ function fetchData() {
})
.then((response) => response.json())
.then((data) => {
chartData = data;
createMetricSelectors(data[0]);
createChart(data);
createTable(data);
const processedData = data.map((item) => {
if (item.kwdate) {
item.kwdate = item.kwdate.split("T")[0];
}
return item;
});
chartData = processedData;
createMetricSelectors(processedData[0]);
createChart(processedData);
createTable(processedData);
document.getElementById("downloadBtn").style.display = "block";
document.getElementById("chartmetricselector").style.display = "block";
})
Expand Down

0 comments on commit ddab4bc

Please sign in to comment.