This is a simple plugin for Chartist.js that will add vertical line with optional label in a line chart.
Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information.
var defaultOptions = {
position: undefined,
label: undefined,
className: 'vertical-line'
};
var chart = new Chartist.Line('.ct-chart', {
labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
series: [
[12, 9, 7, 8, 5],
[2, 1, 3.5, 7, 3],
[1, 3, 4, 5, 6]
]
}, {
plugins: [
Chartist.plugins.verticalLine({
position: 'Tuesday'
})
]
});