Skip to content

Commit

Permalink
refactor: added timestamp in graph xAxis (#108)
Browse files Browse the repository at this point in the history
* refactor: removed console log

* refactor: added hour in graph xAxis
  • Loading branch information
Alex-zReeZ authored Jul 10, 2024
1 parent f95ef11 commit 4697933
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 6 additions & 4 deletions nextjs-interface/src/app/ui/dashboard/ChartElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ export function ChartElement({ data }: { data: avgData[] }) {
axisLine={false}
dataKey="date"
stroke={textColor}
tickFormatter={(value: string) =>
new Date(value).toLocaleDateString()
}
padding={{ left: 20, right: 50 }}
tickFormatter={(value: string) => {
const date = new Date(value);
return `${date.toLocaleDateString()}\n${date.toLocaleTimeString()}`;
}}
tick={{ fill: textColor, fontSize: 12, width: 75, dy: 10 }}
height={60}
/>
<YAxis
fontSize={16}
Expand Down
2 changes: 0 additions & 2 deletions nextjs-interface/src/app/ui/dashboard/EspLinksElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ export default function EspLinksElement() {
}
};

console.log(allLinks);

return (
<>
{allLinks.map((link) => {
Expand Down

0 comments on commit 4697933

Please sign in to comment.