0👍
✅
Your data and labels must be an array. So your code will be something like:
function drawchart(){
var yaxisdata = [yaxischartdata];
var labeldata = [xaxischartdata];
var Data1 = {
labels : labeldata,
datasets : [{
fillColor : "rgba(151,187,205,0.2)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
pointHighlightFill : "#fff",
pointHighlightStroke : "rgba(151,187,205,1)",
data : yaxisdata
}]
};
var ctx = $("#myChart").get(0).getContext("2d");
var myLineChart = new Chart(ctx).Line(Data1);
};
Source:stackexchange.com