Skip to content

Simple plugin for Chartist.js that will add vertical line with optional label in a line chart.

License

Notifications You must be signed in to change notification settings

zubenkoivan/chartist-plugin-vertical-line

Repository files navigation

Vertical Line plugin for Chartist.js

Build Status

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.

Available options and their defaults

var defaultOptions = {
  position: undefined,
  label: undefined,
  className: 'vertical-line'
};

Sample usage in Chartist.js

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'
    })
  ]
});

About

Simple plugin for Chartist.js that will add vertical line with optional label in a line chart.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published