The numbers with the colors and the numbers with the percentage must center align and the text must left align
Im only getting to center align for the numbers with colors. The numbers with the percentage values must also center align but it still showing left align can anyone tell me whats wrong please. Thanks in advance
[CODE] if (pods[i].data.summaryDetailedStepThroughData !== undefined && pods[i].data.summaryDetailedStepThroughData.length > 0) {
rowspanMax = 0;
for (var l = 0; l < Object.keys(pods[i].data.summaryDetailedStepThroughData).length; l++) {
contentHtml += “<tr>”;
for (var m = 0; m < pods[i].data.columns.length; m++) {
for (var field in pods[i].data.summaryDetailedStepThroughData[l]) {
var rowspan = (pods[i].data.summaryDetailedStepThroughData[l].children !== undefined ? pods[i].data.summaryDetailedStepThroughData[l].children.length : “”);
rowspanMax = Math.max(rowspanMax, rowspan);
if (field === pods[i].data.columns[m]) {
var preFix = pods[i].data.summaryDetailedStepThroughData[l][“sPrefix”] !== undefined ? pods[i].data.summaryDetailedStepThroughData[l][“sPrefix”] : “”;
var postFix = pods[i].data.summaryDetailedStepThroughData[l][“sPostfix”] !== undefined ? pods[i].data.summaryDetailedStepThroughData[l][“sPostfix”] : “”;
var value = pods[i].data.summaryDetailedStepThroughData[l][field];
if (value.toString().substr(0, 3) == “- 1”) {
value = “N/A”;
}
var color = pods[i].data.summaryDetailedStepThroughData[l][field + “_color”];
if (colName[m] === “sLabel” && pods[i].data.summaryDetailedStepThroughData[l].bStepThrough == true) {
value = “<a href=”#” class=”stepthrough”>” + value + “</a>”;
}
color = color !== “” && color !== undefined ? ” <span class=”color” style=”background: #” + color + “”></span>” : ” <span class=”color”></span>”; contentHtml += “<td rowspan1=”” + 1 + “” class=”” + (rowspan !== “” && rowspan > 1 ? “groups” : “”) + ” ” + (!isNaN(value) || (!isNaN(value.toString().substr(1, value.length)) || value == “N/A” || typeof value == Number) ? “text-center” : “text-left”) + “”>” + value + (Number(value) ? preFix : “”) + color + (!isNaN(value) ? postFix : “”) + “</td>”;
if (rowspan > 1) {
var rowspanContent = “<td rowspan1=”” + rowspan + “” class=”” + (rowspan !== “” && rowspan > 1 ? “groups” : “”) + ” ” + (!isNaN(value) || (!isNaN(value.toString().substr(1, value.length)) || value == “N/A” || typeof value == Number) ? “text-center” : “text-left”) + “”>” + value + (Number(value) ? preFix : “”) + color + (!isNaN(value) ? postFix : “”) + “</td>”;
}