You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

dchart-bar-acute-angle

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dchart-bar-acute-angle - npm Package Compare versions

Comparing version

to
0.0.9

@@ -1,3 +0,3 @@

// var Bar = require('../../barMultiCustom');
var Bar = require('dchart-core/bar/barMultiCustom');
require('./default.css');
var Bar = require('dchart-core/bar/barCustom');
var _ = require('dchart-core/util');

@@ -8,11 +8,7 @@ var d3 = require('d3');

var opt = {
margin : {top: 20, right: 14, bottom: 30, left: 30},
xaxis : {
type : 'category',
padding : 0.3,
dy: 10,
},
yaxis : {
min : 0,
}
yaxis : {}
};

@@ -27,6 +23,8 @@ _.deepMerge(opt, options);

var opt = this.options;
var xkey = opt.xaxis.key;
var ykey = opt.yaxis.key;
opt.customPos = function (pos, type) {
if (type === 0) {
var x = pos[0].x;
var y = pos[3].y;
var x = pos[0][xkey];
var y = pos[3][ykey];
pos[0] = {

@@ -37,4 +35,4 @@ x: x,

} else if (type === 1) {
var x = pos[2].x;
var y = pos[0].y;
var x = pos[2][xkey];
var y = pos[0][ykey];
pos[3] = {

@@ -45,2 +43,4 @@ x: x,

}
pos[1][ykey] -= (opt && opt.slope || 10)
pos[2][ykey] -= (opt && opt.slope || 10)
return pos;

@@ -47,0 +47,0 @@ }

{
"name": "dchart-bar-acute-angle",
"version": "0.0.8",
"version": "0.0.9",
"main" : "index.js",

@@ -12,4 +12,4 @@ "author": {

"d3": "~3.5.6",
"dchart-core": "~1.0.55"
"dchart-core": "~1.1.3"
}
}