hello !!i am using chart library in my college project . i am ploting chart from local storage . i need to put table below in vertical header format so that chart data points and table data looks aligned. please provide me help asAP. I SHALL BE VERY GREATFULL TO U.
`var canvasP = document.getElementById(“pieChart”)
var ctxP = canvasP.getContext(‘2d’)
var myPieChart = new Chart(ctxP, {type: ‘line’,
data:
{
labels: JSON.parse(localStorage.getItem(“label”)),
datasets: [
{label: “DFT”, data: JSON.parse(localStorage.getItem(“dft”)), borderColor: “ORANGE”,fill: false,markerType: “triangle”},
{label: “FUNCTIONAL”, data: JSON.parse(localStorage.getItem(“fun”)), borderColor: “GREEN”,fill: false,markerType: “circle”}
]
},
options: {
legend: {
display: true,
position: “right”
}
}
});
addTable(myPieChart);
function addTable(myPieChart){
var tableData = “”;
for(var i = 0; i < myPieChart.data.length; i++){
tableData += “<tr>” + “<td style=’color:” + myPieChart.data[i].color + “‘>■” + myPieChart.data[i].name + “</td>”;
tableData += “</tr>”;
}
$(“#chartData”).append(tableData)
PLEASE LOOK INTO CODE IN TABLE FORMAT AND PROVIDE ME NECESSARY CHANGES AND PROVIDE ME THE FIDDLE OR IDea of changes in my code as i am a very new to java script