root page chart table javascript playground wip
This commit is contained in:
parent
64e39dcd85
commit
57f704ef28
1 changed files with 8 additions and 2 deletions
|
@ -340,8 +340,14 @@ function DrawChart() {
|
|||
row[i] = table.insertRow(i);
|
||||
var cell = [];
|
||||
for(let j = 0; j < chartSum; j++) {
|
||||
cell[j] = row[i].insertCell(j);
|
||||
cell[j].innerHTML = ChartJson.chart[j].data[i];
|
||||
/* check if data is present */
|
||||
if((ChartJson.chart[j].hasOwnProperty('data')) && (ChartJson.chart[j].data[i] != "undefined")) {
|
||||
cell[j] = row[i].insertCell(j);
|
||||
cell[j].innerHTML = ChartJson.chart[j].data[i];
|
||||
} else {
|
||||
console.log('Chart ID ' + j + 'does not have any data')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue