如何在chart.js中添加额外的标签

时间:2014-06-27 12:01:00

标签: javascript charts jscharts

如何为x和y-(标签和数据)轴添加额外标签?

var lineChartData = {
        labels : ["2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010"],
        datasets : [
            {
                fillColor : "rgba(19, 82, 252, 0.5)",
                strokeColor : "rgba(220,220,220,1)",
                pointColor : "rgb(0, 27, 232)",
                pointStrokeColor : "#fff",
                data : [1583,1620,1665,1769,1683,1678,1699,1791,1868,1876,1886]
            }
        ]

    }

var myLine = new Chart(document.getElementById("canvas").getContext("2d")).Line(lineChartData);

0 个答案:

没有答案