dchart-bar-gradient

0.1.0 • Public • Published

dchart-bar-gradient

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

安装

npm install dchart-bar-gradient

用法

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

案例

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

Readme

Keywords

none

Package Sidebar

Install

npm i dchart-bar-gradient

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • elvira
  • grace.hw