table-two-bar-chart
v0.0.6
Published
table-two-bar-chart
Downloads
15
Readme
table-two-bar-chart
单根柱状图
安装
npm install table-two-bar-chart
用法
var Table = require('table-two-bar-chart');
var chart = new Table(container, {
enablePages : false, //默认为false
enableFloatFlag : true, //默认为false
head : [
{title : this.name, extra : ''}, //extra为额外部分
{title : '人数', extra : '▼'},
{title : '偏好度TGI', extra : '▼'}
],
series : {
data : res, //[['标题1', value1, value2], ['标题2', value1, value2], ...]
},
seriesTitleFormat : function (i) { //第一列的标题格式,可以自定义加序号等
var label = this[0];
return Util._createSpan('span', label);
}
});
$(this.chart).on('dctable-series.click', function (e, line) { //响应行点击事件
//put your code here
});