0.0.10 • Published 5 years ago

chartist-plugin-gradient v0.0.10

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

Area Gradient plugin for Chartist.js

This is a plugin for Chartist.js that will append a gradient to your line chart that spans opposite directions relative to a baseline threshold.

Gradient Example Screenshot

Download

npm install --save chartist-plugin-gradient

Available options and their defaults

var defaultOptions = {
  threshold: 0;
};

Sample usage in Chartist.js

import ctAreaGradient from 'chartist-plugin-gradient';

var chart = new Chartist.Line('.ct-chart', {
  series: [
    [1, 5, -3, 4, -6, 2, -3, 0]
  ]
}, {
  showArea: true,
  areaBase: 0,
  plugins: [
    ctAreaGradient({
      threshold: 0
    })
  ]
});
.ct-base-above, .ct-base-below {
  fill: #000;
}
0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago