dchart-bar-acute-angle
Advanced tools
Comparing version
29
index.js
@@ -5,3 +5,3 @@ var Bar = require('dchart-core/bar/barMultiCustom'); | ||
function CountryBar(container, options) { | ||
function barAcuteAngle(container, options) { | ||
var opt = { | ||
@@ -16,4 +16,13 @@ margin : {top: 0, right: 14, bottom: 30, left: 15}, | ||
min : 0, | ||
}, | ||
customPos: function (pos, type) { | ||
} | ||
}; | ||
_.deepMerge(opt, options); | ||
Bar.call(this, container, opt); | ||
} | ||
barAcuteAngle = Bar.extend(barAcuteAngle, { | ||
beforeRender : function () { | ||
Bar.prototype.beforeRender.call(this); | ||
var opt = this.options; | ||
opt.customPos = function (pos, type) { | ||
if (type === 0) { | ||
@@ -24,3 +33,3 @@ var x = pos[0].x; | ||
x: x, | ||
y: y - (options && options.slope || 10) | ||
y: y - (opt && opt.slope || 10) | ||
}; | ||
@@ -32,3 +41,3 @@ } else if (type === 1) { | ||
x: x, | ||
y: y - (options && options.slope || 10) | ||
y: y - (opt && opt.slope || 10) | ||
}; | ||
@@ -38,9 +47,5 @@ } | ||
} | ||
}; | ||
_.deepMerge(opt, options); | ||
Bar.call(this, container, opt); | ||
} | ||
} | ||
}); | ||
CountryBar = Bar.extend(CountryBar, {}); | ||
module.exports = CountryBar; | ||
module.exports = barAcuteAngle; |
{ | ||
"name": "dchart-bar-acute-angle", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main" : "index.js", | ||
@@ -5,0 +5,0 @@ "author": { |
1285
12.03%3
50%43
13.16%