Chartist-js: How can I label the each dataset in line chart ?

Created on 20 Apr 2017  路  2Comments  路  Source: gionkunz/chartist-js

I have the following code below which i want to label each dataset for the users more easily to identify

new Chartist.Line('.ct-chart', {
            labels: labels,
            series:[{
                name: "2012",
                data: year1
            }, {
                name: "2013",
                data: year2
            }, {
                name: "2014",
                data: year3
            }, {
                name: "2015",
                data: year4
            }],

}

Do I have to change the css file to do this task ?
For example:
html5_multiseries_line_chart jpg

Most helpful comment

any reason why it's not listed on the plugin page?
http://gionkunz.github.io/chartist-js/plugins.html

All 2 comments

any reason why it's not listed on the plugin page?
http://gionkunz.github.io/chartist-js/plugins.html

Was this page helpful?
0 / 5 - 0 ratings