function createTable(tob){
for (var [module, focusDetails] of Object.entries(tob)) {
//console.log(module);
var focusList = focusDetails.focusDetails;
console.log(focusList);
var divColumn = $('<div>').addClass('column');
let divCard = $('<div>').addClass('card');
let table = $('<table>').addClass('table table-striped');
let thead = $('<thead>').addClass('thead');
let trtitle = $('<tr>');
let title = $('<b>').text(module);
trtitle.append(title);
thead.append(trtitle);
let trHead = $('<tr>');
let headRow = '<th></th><th>Tdy</th><th>Yda</th><th> % +/-</th><th>7 Days</th><th>Top Depts</th>';
trHead.append(headRow);
thead.append(trHead);
table.append(thead);
let tbody = $('<tbody>').addClass('tbody');
for (var [focusName, focusRow] of Object.entries(focusList)) {
let row = $('<tr>');
let tdFocusName = $('<td>').text(focusName);
let tdCountTday = $('<td>').text(focusRow.count_tdy);
let tdCountYday = $('<td>').text(focusRow.count_ydy);
let tdChart = $('<td>');
let barchart = $('<span> </span>');
barchart.sparkline([1,2,3,2], {type: 'bar'});
//barchart.sparkline(focusRow.last7days, {type: 'bar'});
tdChart.append(barchart);
let tdLocation = $('<td>').text(focusRow.location_tdy);
row.append(tdFocusName);
row.append(tdCountTday);
row.append(tdCountYday);
row.append(tdChart);
row.append(tdLocation);
tbody.append(row);
}
table.append(tbody);
divCard.append(table);
divColumn.append(divCard);
$("#chart-row").append(divColumn);
$.sparkline_display_visible();
}
}