所以,我正在使用ChartJS的教程,我可以很好地创建折线图,但是当我将鼠标悬停在点上时,它不会显示数据。当我尝试使用options数组添加标题时,它不起作用。这是我的代码。
var buyerData = {
labels : ["January","February","March","April","May","June"],
datasets : [
{
fillColor : "rgba(172,194,132,0.4)",
strokeColor : "#ACC26D",
pointColor : "#fff",
pointStrokeColor : "#9DB86D",
data : [203,156,99,251,305,247]
}
]
}
var options = {
title: {
display: true,
text: 'Test'
},
responsive: true,
animation: true });
var buyers = document.getElementById('buyers').getContext('2d');
new Chart(buyers).Line(buyerData, options);