diff --git a/priv/frontend/src/Graph.js b/priv/frontend/src/Graph.js
index e95b01b..a4f05c6 100644
--- a/priv/frontend/src/Graph.js
+++ b/priv/frontend/src/Graph.js
@@ -23,6 +23,10 @@ export default class Graph extends Component {
];
}
+ isSmallScreen() {
+ return window.innerWidth < 500;
+ }
+
render() {
return (
@@ -46,8 +50,9 @@ export default class Graph extends Component {
axisBottom={{
format: (epoch) => {
+ const interval = this.isSmallScreen() ? 7 : 5;
const minutesAgo = Math.floor((Date.now() - epoch) / (1000 * 60));
- if (minutesAgo % 5 !== 0 || minutesAgo === 0) {
+ if (minutesAgo % interval !== 0 || minutesAgo === 0) {
return undefined;
}