作者:1237i | 来源:互联网 | 2023-05-19 16:01
IammakingalinechartwithHighchartsandeverythingwasfinebuttheX-axis.Itsnotdisplaying
I am making a line chart with Highcharts and everything was fine but the X-axis. It's not displaying the right data which I have get from mysql. This is my chart right now but it is not what i expected. X-Axis row auto change all of my data to 01:[my minutes]:[my mins], example: my data is:2015-05-12 08:23:40 it auto convert to 01:23:40. i don't know why
我正在用Highcharts制作折线图,一切都很好但是X轴。它没有显示我从mysql获得的正确数据。这是我现在的图表,但这不是我的预期。 X轴行自动将我的所有数据更改为01:[我的分钟]:[我的分钟],例如:我的数据是:2015-05-12 08:23:40它自动转换为01:23:40。我不知道为什么
http://imgur.com/YSC7vTl,Y4jYQ8q#0
I need a chart look like this but I don't know how to fix it, help me please.
我需要一个这样的图表,但我不知道如何解决它,请帮助我。
http://imgur.com/YSC7vTl,Y4jYQ8q#1
My codes are below:
我的代码如下:
and this is my XAxis
这是我的XAxis
xAxis: {
type: 'datetime',
datetime:[=$newcates?>],
minTickInterval: moment.duration(1, 'month').asMinutes()
},
this is my databaselooks like:
这是我的数据库看起来像:
id idchip datetime signal temperature
Edit Delete 1 5 2015-05-12 08:24:40 + 29
Edit Delete 12 5 2015-05-12 08:23:40 + 031
Edit Delete 3 6 2015-05-12 08:27:55 + 29
Edit Delete 4 7 2015-05-12 08:26:01 + 50
Edit Delete 5 5 2015-05-12 08:25:12 + 28
Edit Delete 6 6 2015-05-12 08:28:32 + 29
Edit Delete 7 6 2015-05-12 08:24:42 + 30
Edit Delete 8 5 2015-05-12 08:27:58 + 29
Edit Delete 9 5 2015-05-12 08:26:02 + 31
Edit Delete 10 5 2015-05-12 08:26:13 + 29
Edit Delete 11 5 2015-05-12 08:26:53 + 32
1 个解决方案