fixed issue #UI-22

master-patched
Tyler Wolf 12 years ago
parent ede1088797
commit 0de0ea9ab6

@ -8001,9 +8001,11 @@ nv.models.scatter = function() {
//inject series and point index for reference into voronoi
if (useVoronoi === true) {
// Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
if(vertices.length < 3) {
// Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
}
var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
return {
'data': d,

4
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -173,9 +173,11 @@ nv.models.scatter = function() {
//inject series and point index for reference into voronoi
if (useVoronoi === true) {
// Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
if(vertices.length < 3) {
// Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
}
var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
return {
'data': d,

Loading…
Cancel
Save