var radarChartData = {
labels: ['Кол-во баллов'],
datasets: [
{
label: "Кол-во баллов",
fillColor: "rgba(44, 44, 210, 0.28)",
strokeColor: "rgba(44, 44, 210, 1)",
pointColor: "rgba(44, 44, 210, 1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(44, 44, 210, 0.7)",
data: [2,2,2,2]
}
]
};
data: [2,2,2,2]
radarChartData.datasets[0].data[i] = stats[i];
var radarChartData = {
labels: ['Кол-во баллов'],
datasets: [
{
label: "Кол-во баллов",
fillColor: "rgba(44, 44, 210, 0.28)",
strokeColor: "rgba(44, 44, 210, 1)",
pointColor: "rgba(44, 44, 210, 1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(44, 44, 210, 0.7)",
data: [2,2,2,2],
}
]
};
var i = 1;
radarChartData.datasets[0].data.length = 0;
radarChartData.datasets[0].data.unshift(i);
console.log(radarChartData.datasets[0].data)