В общем есть выборка:
$de_donat = new \app\models\donat();
$dechart = $de_donat->getUserDonat($this->usid, 5, 5);
echo json_encode($dechart)."<br>";
Возвращает:
[{"id":"31","user_id":"614","user":"testovii","sum":"1","date_add":"1520640302","payment_system":"acusd","currs":"USD","type":"2","info":"6","fullname":"AdvCash (USD)","format":"%.2f"},{"id":"30","user_id":"614","user":"testovii","sum":"1","date_add":"1520640242","payment_system":"acusd","currs":"USD","type":"2","info":"6","fullname":"AdvCash (USD)","format":"%.2f"},{"id":"29","user_id":"614","user":"testovii","sum":"1","date_add":"1520640183","payment_system":"acusd","currs":"USD","type":"2","info":"6","fullname":"AdvCash (USD)","format":"%.2f"},{"id":"5","user_id":"614","user":"testovii","sum":"520.83333333333","date_add":"1520633403","payment_system":"ac","currs":"RUB","type":"2","info":"4","fullname":"AdvCash (RUB)","format":"%.2f"}]
запихнуть следует сюда:
data: [здесь через запятую], // donat sum on days
как из ответа забрать только суммы и внести в data: [...]?