[Bug] Time axis is not correct on graphs
Opened this issue · 1 comments
General
- I have updated to the latest version of MySpeed.
- My bug has not been reported yet.
The Bug
On graphs displaying upload/download speeds and ping, the x-axis indicating time is not correct.
On the image below you can see there is the same spacing between ticks of 15:25 and 16:00 (35 min) as there is between 17:00 and 17:19 (19 min) or between 19:00 and 20:00 (60 min).
This works well if one uses only the automatic tests without ever changing the delay between tests, however I expect the ticks on the time axis being spaced depending on the exact time elapsed between speed tests.
What device are you using to access the page?
In the browser
Which operating system is your MySpeed instance running on?
Linux
It looks like these files https://github.com/gnmyt/myspeed/blob/development/client/src/pages/Statistics/charts/PingChart.jsx and https://github.com/gnmyt/myspeed/blob/development/client/src/pages/Statistics/charts/SpeedChart.jsx should be modified to specify a type time
on the x-axis.
Exemple from chartJS docs :
scales: {
x: {
type: 'time',
time: {
unit: 'month'
}
}
}
Source : https://www.chartjs.org/docs/latest/axes/cartesian/time.html