dchart-bar-multi-hori-gradient

0.0.1 • Public • Published

dchart-bar-multi-hori-gradient

符合dchart规范的柱状对比图,柱子背景可以为渐变色

安装

npm install dchart-bar-multi-hori-gradient

用法

var Bar = require('dchart-bar-multi-hori-gradient');
var bar = new Bar(container, {
  margin: {left:14, top:30, right: 16, bottom: 98},
    yaxis : {
      padding: [0.5, 0.6],
      groupPadding: [0, 0],
      dy : 2
    },
    gradientColors : [{
      from: 'rgb(255,255,0)',
      to: 'rgb(255,0,0)',
      orient: 'vertical',
    }, {
      from: 'rgb(255,0,0)',
      to: 'rgb(255,255,0)',
      orient: 'vertical',
    }]
});
bar.render([
        {"x": "山东", "y": [100, 57]},
        {"x": "山西", "y": [97, 52]},
        {"x": "河北", "y": [93, 49]}
      ]);

案例

在根目录下, 启动
cube start
访问路径
http://localhost:9999/demo/test.html

Readme

Keywords

none

Package Sidebar

Install

npm i dchart-bar-multi-hori-gradient

Weekly Downloads

0

Version

0.0.1

License

ISC

Last publish

Collaborators

  • elvira