Skip to content

Commit

Permalink
bumps to v1.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Jun 1, 2016
1 parent fe3a94d commit cb5a645
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 37 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "d3plus",
"main": "./d3plus.full.js",
"version": "1.9.4",
"version": "1.9.5",
"moduleType": ["node"],
"homepage": "https://github.com/alexandersimoes/d3plus",
"description": "Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.",
Expand Down
30 changes: 22 additions & 8 deletions d3plus.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -28570,7 +28570,7 @@ d3plus = {};
* @static
*/

d3plus.version = "1.9.4 - Cornflower";
d3plus.version = "1.9.5 - Cornflower";


/**
Expand Down Expand Up @@ -30363,6 +30363,7 @@ var defaultLocale = require("../core/locale/languages/en_US.coffee"),
rtl = require("../client/rtl.coffee"),
removeTooltip = require("./remove.coffee"),
scroll = require("../client/scroll.js"),
scrollBar = require("../client/scrollBar.coffee"),
stringList = require("../string/list.coffee"),
textColor = require("../color/text.coffee")

Expand Down Expand Up @@ -30404,6 +30405,8 @@ module.exports = function(params) {

if (params.parent.node() === document.body) {
params.limit = [window.innerWidth + scroll.x(), window.innerHeight + scroll.y()];
var sb = scrollBar();
if (document.body.scrollHeight > window.innerHeight) params.limit[0] -= sb;
}
else {
params.limit = [
Expand Down Expand Up @@ -30937,7 +30940,7 @@ function close_descriptions() {
d3.selectAll("div.d3plus_tooltip_data_help").style("background-color","#ccc");
}

},{"../client/pointer.coffee":40,"../client/prefix.coffee":41,"../client/rtl.coffee":42,"../client/scroll.js":43,"../color/legible.coffee":46,"../color/text.coffee":52,"../core/locale/languages/en_US.coffee":72,"../string/list.coffee":177,"./move.coffee":205,"./remove.coffee":206}],205:[function(require,module,exports){
},{"../client/pointer.coffee":40,"../client/prefix.coffee":41,"../client/rtl.coffee":42,"../client/scroll.js":43,"../client/scrollBar.coffee":44,"../color/legible.coffee":46,"../color/text.coffee":52,"../core/locale/languages/en_US.coffee":72,"../string/list.coffee":177,"./move.coffee":205,"./remove.coffee":206}],205:[function(require,module,exports){
var arrowStyle, scroll;

scroll = require("../client/scroll.js");
Expand Down Expand Up @@ -36982,11 +36985,15 @@ module.exports = function( vars ) {
};
}
else {
focus = d.value[0];
focus = d.focus || d.value[0];
if (validObject(focus)) focus = focus[d3.keys(focus)[0]];
if (typeof d.method === "function") {
callback = function(value) {
d.method(value, vars.self);
if (value !== focus) {
focus = value;
d.focus = value;
d.method(value, vars.self);
}
};
}
}
Expand Down Expand Up @@ -40723,7 +40730,7 @@ stack = require("./helpers/graph/stack.coffee");
uniques = require("../../util/uniques.coffee");

bar = function(vars) {
var bars, base, cMargin, d, data, discrete, discreteVal, divisions, domains, h, i, ids, j, k, l, len, len1, len2, length, maxBars, maxSize, mod, nested, newSize, oMargin, offset, oppMethod, oppVal, opposite, p, padding, point, ref, ref1, space, value, w, x, zero;
var bars, base, cMargin, d, data, discrete, discreteVal, divisions, domains, h, i, ids, j, k, l, len, len1, len2, length, maxBars, maxSize, mod, nested, newSize, oMargin, offset, oppDomain, oppMethod, oppVal, opposite, p, padding, point, ref, ref1, space, value, w, x, zero;
discrete = vars.axes.discrete;
h = discrete === "x" ? "height" : "width";
w = discrete === "x" ? "width" : "height";
Expand Down Expand Up @@ -40777,7 +40784,14 @@ bar = function(vars) {
}
data = [];
oppMethod = vars[opposite];
zero = d3.min(oppMethod.scale.viz.domain());
oppDomain = oppMethod.scale.viz.domain();
if (oppDomain[0] <= 0 && oppDomain[1] >= 0) {
zero = 0;
} else if (oppDomain[0] < 0) {
zero(d3.max(oppDomain));
} else {
zero = d3.min(oppDomain);
}
if (vars[discrete].persist.position.value && !vars.axes.stacked) {
ids = uniques(d3.merge(nested.map(function(d) {
return d.values;
Expand Down Expand Up @@ -41772,7 +41786,7 @@ getScale = function(vars, axis, range) {
}
}
vars[axis].scale.ticks = t;
return d3.scale[scaleType]().domain(range).range(rangeArray);
return d3.scale[scaleType]().domain(range).range(rangeArray).clamp(true);
};

sizeScale = function(vars, value) {
Expand Down Expand Up @@ -42869,7 +42883,7 @@ module.exports = function(vars) {
d = +d;
}
if (!vars[axis].ticks.hidden && vars[axis].ticks.visible.indexOf(d) >= 0) {
return textwrap().container(d3.select(this)).rotate(vars[axis].ticks.rotate).align(rotated ? "end" : "center").valign(rotated ? "middle" : axis === "x" ? "top" : "bottom").width(vars[axis].ticks.maxWidth).height(vars[axis].ticks.maxHeight).padding(0).x(-vars[axis].ticks.maxWidth / 2).y(axis === "x2" ? -(vars[axis].ticks.maxHeight + vars.labels.padding * 2) : 0).draw();
return textwrap().container(d3.select(this)).rotate(vars[axis].ticks.rotate).align(rotated ? "end" : "center").valign(rotated ? "middle" : axis === "x" ? "top" : "bottom").width(vars[axis].ticks.maxWidth + 2).height(vars[axis].ticks.maxHeight).padding(0).x(-vars[axis].ticks.maxWidth / 2).y(axis === "x2" ? -(vars[axis].ticks.maxHeight + vars.labels.padding * 2) : 0).draw();
}
});
};
Expand Down
20 changes: 10 additions & 10 deletions d3plus.full.min.js

Large diffs are not rendered by default.

30 changes: 22 additions & 8 deletions d3plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -18467,7 +18467,7 @@ d3plus = {};
* @static
*/

d3plus.version = "1.9.4 - Cornflower";
d3plus.version = "1.9.5 - Cornflower";


/**
Expand Down Expand Up @@ -20254,6 +20254,7 @@ var defaultLocale = require("../core/locale/languages/en_US.coffee"),
rtl = require("../client/rtl.coffee"),
removeTooltip = require("./remove.coffee"),
scroll = require("../client/scroll.js"),
scrollBar = require("../client/scrollBar.coffee"),
stringList = require("../string/list.coffee"),
textColor = require("../color/text.coffee")

Expand Down Expand Up @@ -20295,6 +20296,8 @@ module.exports = function(params) {

if (params.parent.node() === document.body) {
params.limit = [window.innerWidth + scroll.x(), window.innerHeight + scroll.y()];
var sb = scrollBar();
if (document.body.scrollHeight > window.innerHeight) params.limit[0] -= sb;
}
else {
params.limit = [
Expand Down Expand Up @@ -20828,7 +20831,7 @@ function close_descriptions() {
d3.selectAll("div.d3plus_tooltip_data_help").style("background-color","#ccc");
}

},{"../client/pointer.coffee":38,"../client/prefix.coffee":39,"../client/rtl.coffee":40,"../client/scroll.js":41,"../color/legible.coffee":44,"../color/text.coffee":50,"../core/locale/languages/en_US.coffee":70,"../string/list.coffee":174,"./move.coffee":202,"./remove.coffee":203}],202:[function(require,module,exports){
},{"../client/pointer.coffee":38,"../client/prefix.coffee":39,"../client/rtl.coffee":40,"../client/scroll.js":41,"../client/scrollBar.coffee":42,"../color/legible.coffee":44,"../color/text.coffee":50,"../core/locale/languages/en_US.coffee":70,"../string/list.coffee":174,"./move.coffee":202,"./remove.coffee":203}],202:[function(require,module,exports){
var arrowStyle, scroll;

scroll = require("../client/scroll.js");
Expand Down Expand Up @@ -26873,11 +26876,15 @@ module.exports = function( vars ) {
};
}
else {
focus = d.value[0];
focus = d.focus || d.value[0];
if (validObject(focus)) focus = focus[d3.keys(focus)[0]];
if (typeof d.method === "function") {
callback = function(value) {
d.method(value, vars.self);
if (value !== focus) {
focus = value;
d.focus = value;
d.method(value, vars.self);
}
};
}
}
Expand Down Expand Up @@ -30614,7 +30621,7 @@ stack = require("./helpers/graph/stack.coffee");
uniques = require("../../util/uniques.coffee");

bar = function(vars) {
var bars, base, cMargin, d, data, discrete, discreteVal, divisions, domains, h, i, ids, j, k, l, len, len1, len2, length, maxBars, maxSize, mod, nested, newSize, oMargin, offset, oppMethod, oppVal, opposite, p, padding, point, ref, ref1, space, value, w, x, zero;
var bars, base, cMargin, d, data, discrete, discreteVal, divisions, domains, h, i, ids, j, k, l, len, len1, len2, length, maxBars, maxSize, mod, nested, newSize, oMargin, offset, oppDomain, oppMethod, oppVal, opposite, p, padding, point, ref, ref1, space, value, w, x, zero;
discrete = vars.axes.discrete;
h = discrete === "x" ? "height" : "width";
w = discrete === "x" ? "width" : "height";
Expand Down Expand Up @@ -30668,7 +30675,14 @@ bar = function(vars) {
}
data = [];
oppMethod = vars[opposite];
zero = d3.min(oppMethod.scale.viz.domain());
oppDomain = oppMethod.scale.viz.domain();
if (oppDomain[0] <= 0 && oppDomain[1] >= 0) {
zero = 0;
} else if (oppDomain[0] < 0) {
zero(d3.max(oppDomain));
} else {
zero = d3.min(oppDomain);
}
if (vars[discrete].persist.position.value && !vars.axes.stacked) {
ids = uniques(d3.merge(nested.map(function(d) {
return d.values;
Expand Down Expand Up @@ -31663,7 +31677,7 @@ getScale = function(vars, axis, range) {
}
}
vars[axis].scale.ticks = t;
return d3.scale[scaleType]().domain(range).range(rangeArray);
return d3.scale[scaleType]().domain(range).range(rangeArray).clamp(true);
};

sizeScale = function(vars, value) {
Expand Down Expand Up @@ -32760,7 +32774,7 @@ module.exports = function(vars) {
d = +d;
}
if (!vars[axis].ticks.hidden && vars[axis].ticks.visible.indexOf(d) >= 0) {
return textwrap().container(d3.select(this)).rotate(vars[axis].ticks.rotate).align(rotated ? "end" : "center").valign(rotated ? "middle" : axis === "x" ? "top" : "bottom").width(vars[axis].ticks.maxWidth).height(vars[axis].ticks.maxHeight).padding(0).x(-vars[axis].ticks.maxWidth / 2).y(axis === "x2" ? -(vars[axis].ticks.maxHeight + vars.labels.padding * 2) : 0).draw();
return textwrap().container(d3.select(this)).rotate(vars[axis].ticks.rotate).align(rotated ? "end" : "center").valign(rotated ? "middle" : axis === "x" ? "top" : "bottom").width(vars[axis].ticks.maxWidth + 2).height(vars[axis].ticks.maxHeight).padding(0).x(-vars[axis].ticks.maxWidth / 2).y(axis === "x2" ? -(vars[axis].ticks.maxHeight + vars.labels.padding * 2) : 0).draw();
}
});
};
Expand Down
16 changes: 8 additions & 8 deletions d3plus.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3plus",
"version": "1.9.4",
"version": "1.9.5",
"description": "Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.",
"devDependencies": {
"browserify": "^13.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ d3plus = {}
# @type String
# @static
###
d3plus.version = "1.9.4 - Cornflower"
d3plus.version = "1.9.5 - Cornflower"

###*
# The URL for the repo, used internally for certain error messages.
Expand Down

0 comments on commit cb5a645

Please sign in to comment.