chartist-js/site/code-snippets/simple-start-fixed-chart.js
Robin Edbom 1b08948d34 Update simple-start-fixed-chart.js
It says Line in the comment, the prev chart was a line so I guess this was a typo.

BTW, nice Jobbs!
2016-03-16 09:29:11 +01:00

21 lines
731 B
JavaScript

var data = {
// A labels array that can contain any sort of values
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
// Our series array that contains series objects or in this case series data arrays
series: [
[5, 2, 4, 2, 0]
]
};
// As options we currently only set a static size of 300x200 px. We can also omit this and use aspect ratio containers
// as you saw in the previous example
var options = {
width: 300,
height: 200
};
// Create a new line chart object where as first parameter we pass in a selector
// that is resolving to our chart container element. The Second parameter
// is the actual data object. As a third parameter we pass in our custom options.
new Chartist.Line('.ct-chart', data, options);