Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在C3 timeseries图表中显示给定JSON数据的多个数据行_Javascript_Json_C3.js_Timeserieschart - Fatal编程技术网

Javascript 如何在C3 timeseries图表中显示给定JSON数据的多个数据行

Javascript 如何在C3 timeseries图表中显示给定JSON数据的多个数据行,javascript,json,c3.js,timeserieschart,Javascript,Json,C3.js,Timeserieschart,我想在C3中生成多个timeseries图表。我在JSON中的数据如下所示。我想在x轴上显示“unixTS”,对于每个ID,我想在Y轴上显示带有tempValue的行。如何显示每个ID,如ID 1、ID 2、ID 3及其各自的tempValue。最后,我需要在图表中为ID1、ID2和ID3设置三行及其临时值。此外,unix时间戳对于每个ID都是唯一的,请建议我 [ {"ID":"1","unixTS":1489481279257,"tempValue":24.71}, {"ID":"1

我想在C3中生成多个
timeseries
图表。我在
JSON
中的数据如下所示。我想在
x轴上显示
“unixTS”
,对于每个ID,我想在
Y轴上显示带有
tempValue
的行。如何显示每个ID,如ID 1、ID 2、ID 3及其各自的
tempValue
。最后,我需要在图表中为
ID1、ID2和ID3
设置三行及其临时值。此外,unix时间戳对于每个ID都是唯一的,请建议我

[
 {"ID":"1","unixTS":1489481279257,"tempValue":24.71},   
 {"ID":"1","unixTS":1489481284262,"tempValue":17.72}, 
 {"ID":"1","unixTS":1489481289268,"tempValue":15.69},
 {"ID":"2","unixTS":1489481289268,"tempValue":15.69},
 {"ID":"2","unixTS":1489481289268,"tempValue":15.69},
 {"ID":"3","unixTS":1489481289268,"tempValue":17.69},
 {"ID":"3","unixTS":1489481289268,"tempValue":15.89}
]