1 回答

TA貢獻(xiàn)1777條經(jīng)驗(yàn) 獲得超3個(gè)贊
的數(shù)據(jù)屬性$dataPoints應(yīng)該是一個(gè)數(shù)組。如果您獲得單個(gè)值,則必須對(duì)其進(jìn)行轉(zhuǎn)換
...
$dataPoints = array(
array( "label" => "Gold Star" , "data" => array($gold) , "backgroundColor" => "rgba(255,215,0,1)"),
array( "label" => "Green Light" , "data" => array($green) , "backgroundColor" => "rgba(0,128,0,1)"),
array( "label" => "Yellow Light" , "data" => array($yellow) , "backgroundColor" => "rgba(255,255,0,1)"),
array( "label" => "Red Light" , "data" => array($red) , "backgroundColor" => "rgba(255,0,0,1)" )
);
...
- 1 回答
- 0 關(guān)注
- 184 瀏覽
添加回答
舉報(bào)