The above is a real-time outdoor temperature statistics chart. The data is taken from mysql and the database adds a new record every five minutes. Now I want to display it through the highcharts chart. The problem I encountered is: 1) now you need to fix the horizontal axis. The horizontal axis is 24 hours. 2) because the database format is...
The above is a real-time outdoor temperature statistics chart. The data is taken from mysql and the database adds a new record every five minutes. Now I want to display it through the highcharts chart. The problem I encountered is:
1) now the horizontal axis needs to be fixed, and the horizontal axis is 24 hours
2) because the database format is 03:00:00, how can we display the time in the corresponding time area of the horizontal axis?
That is to say, the database has a record. The datetime value is 09:01:23, and the data value is 20.4. You need to display the data between the scales from.
How can this problem be achieved? Thank you!
Reply content:
The above is a real-time outdoor temperature statistics chart. The data is taken from mysql and the database adds a new record every five minutes. Now I want to display it through the highcharts chart. The problem I encountered is:
1) now the horizontal axis needs to be fixed, and the horizontal axis is 24 hours
2) because the database format is 03:00:00, how can we display the time in the corresponding time area of the horizontal axis?
That is to say, the database has a record. The datetime value is 09:01:23, and the data value is 20.4. You need to display the data between the scales from.
How can this problem be achieved? Thank you!
If the horizontal axis is a timeline, we recommend that you use highstock instead of highcharts. Highstock is a more professional timeline.
The X axis is measured in seconds from 0 to 86400.
Convert datetime to seconds
Your Database adds a record every five minutes, so you can make your horizontal axis a 5-minute trial, just like expanding the clock scale into a line, accurate numbers are used to mark a punctuality. I don't know. It's just a guess!
Let's take a look ~~ Can it be solved?