Using dynamic array in chartJs for label and data

0👍

i resolve this by convertion collection to an array :

var refC = document.getElementsByName("ref");
var ref =[];
for(var i = 0; i < refC.length; i++){
ref[i]=document.getElementsByName("ref")[i].value;}

var entC = document.getElementsByName("ent");
var ent =[];
for(var i = 0; i < entC.length; i++){
ent[i]=document.getElementsByName("ent")[i].value;}

Leave a comment