Skip to content

Commit 8e0160a

Browse files
committed
ran make on previous changes
2 parents 884fbf5 + 5f79dba commit 8e0160a

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

examples/stackedAreaChart.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@
197197
.color(keyColor)
198198
//.clipEdge(true);
199199

200-
chart.stacked.scatter
201-
.sizeRange([64,64])
202-
.useVoronoi(false);
200+
// chart.stacked.scatter.clipVoronoi(false);
203201

204202
chart.xAxis
205203
.tickFormat(function(d) { return d3.time.format('%x')(new Date(d)) });

nv.d3.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -8215,15 +8215,24 @@ nv.models.scatter = function() {
82158215
vertices.push([x.range()[0] - 2000, y.range()[0] + 2000, null, null]);
82168216
vertices.push([x.range()[1] + 2000, y.range()[1] - 2000, null, null]);
82178217
}
8218+
8219+
var bounds = d3.geom.polygon([
8220+
[0,0],
8221+
[0,height],
8222+
[width,height],
8223+
[width,0]
8224+
]);
8225+
82188226
var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
82198227
return {
8220-
'data': d,
8228+
'data': bounds.clip(d),
82218229
'series': vertices[i][2],
82228230
'point': vertices[i][3]
82238231
}
82248232
});
82258233

82268234

8235+
82278236
var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
82288237
.data(voronoi);
82298238
pointPaths.enter().append('path')

nv.d3.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/models/scatter.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,24 @@ nv.models.scatter = function() {
189189
vertices.push([x.range()[0] - 2000, y.range()[0] + 2000, null, null]);
190190
vertices.push([x.range()[1] + 2000, y.range()[1] - 2000, null, null]);
191191
}
192+
193+
var bounds = d3.geom.polygon([
194+
[0,0],
195+
[0,height],
196+
[width,height],
197+
[width,0]
198+
]);
199+
192200
var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
193201
return {
194-
'data': d,
202+
'data': bounds.clip(d),
195203
'series': vertices[i][2],
196204
'point': vertices[i][3]
197205
}
198206
});
199207

200208

209+
201210
var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
202211
.data(voronoi);
203212
pointPaths.enter().append('path')

0 commit comments

Comments
 (0)