0
我可以使用JSON文件中的數據元素作爲x,y值嗎?這是我的JSON文件,我想使用reading_bs作爲x值,並使用reading_date作爲y值。Forio Contour動態json數組
[
{
"id": 76,
"user_id": 6,
"reading_date": "2016-02-23",
"reading_bs": 2,
"fasting": true,
"reading_notes": "test"
},
{
"id": 77,
"user_id": 6,
"reading_date": "2016-02-24",
"reading_bs": 2,
"fasting": true,
"reading_notes": "test2"
},
{
"id": 78,
"user_id": 6,
"reading_date": "2016-02-25",
"reading_bs": 2,
"fasting": true,
"reading_notes": "test3"
}
]
其他值在頁面的其他地方使用。
那麼,這不起作用?我不清楚你對x和y規格的評論。映射沒有那樣做? –
我在單線圖上使用它。 JSON文件是否需要缺乏引號才能起作用,還是隻是JSFiddle的一件事? –
另外,y軸可以是日期嗎?如果是這樣,那將如何工作? –