Skip to content

Commit

Permalink
east coast
Browse files Browse the repository at this point in the history
  • Loading branch information
nhomble committed Dec 25, 2022
1 parent 9b32de8 commit f04eace
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/commands/update-charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ const processChart = async (data: {
.then((out) => {
return out.results.map((result) => ({
value: result["properties"][data.key].title[0].plain_text,
time: result["properties"]["Time"].created_time,
time: new Date(result["properties"]["Time"].created_time).toLocaleString("en-US", {timeZone: "America/New_York"}),
}));
});
console.log(points)
const chart = new QuickChart();
chart.setConfig({
type: "line",
data: {
datasets: [
{
data: points.map((p) => ({
x: `${p.time}`,
x: p.time,
y: +p.value,
})),
label: data.key,
Expand All @@ -76,12 +77,6 @@ const processChart = async (data: {
{
type: "time",
distribution: 'linear',
time: {
parser: "YYYY-MM-DDThh:mm:ssZ",
},
displayFormats: {
day: "MMM DD YYYY",
},
},
],
},
Expand Down

0 comments on commit f04eace

Please sign in to comment.