0.0.6 • Published 4 years ago

chartist-error-bars v0.0.6

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Error Bar plugin for Chartist.js

A simple plugin that draws an error bar on top of a Chartist.js chart.

This plugin works with both bar charts (Chartist.Bar) and line charts (Chartist.Line).

Available options and their defaults

var defaultOptions = {
  errorClass: 'ct-error',
  orientation: 'horizontal', // or 'vertical', only applies to bar charts
  confidenceLimit: {
	upper: [], 
	lower: []
	}
 };

Example with Chartist.js

var chart = new Chartist.Bar('.ct-chart', {
  labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  series: [
	[5, 2, 4, 2, 0],
	[7, 4, 6, 1, null]
  ]}, {
  plugins: [ 
	Chartist.plugins.errorBars({
      errorClass: 'ct-error',
      orientation: 'horizontal',
	  confidenceLimit: { 
	  upper: [
	    [6,3,5,3,0],
		[8,5,7,1.5,0]
	  ],
	  lower: [
		[4,1,3,1,0],
		[6,3,5,0.5,0]
	  ]}
	})
  ]
});	
0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago