Skip to content

Commit b137470

Browse files
rueckstiesskangas
authored andcommitted
INT-1243 fix transparency issue with overlapping lines
1 parent 05c8906 commit b137470

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/app/minicharts/d3fns/date.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,17 @@ var minicharts_d3fns_date = function() {
255255
.attr('y', barcodeTop)
256256
.attr('height', barcodeBottom - barcodeTop);
257257

258-
var lines = g.selectAll('.selectable')
259-
.data(values, function(d) {
260-
return d.ts;
261-
});
258+
var lineContainer = gEnter.append('g')
259+
.attr('class', 'line-container');
260+
261+
var lines = lineContainer.selectAll('.selectable').data(values, function(d) {
262+
return d.ts;
263+
});
262264

263265
lines.enter().append('line')
264266
.attr('class', 'line selectable')
265267
.style('opacity', function() {
266-
return values.length > 200 ? 0.3 : 1.0;
268+
return lines.size() > 200 ? 0.3 : 1.0;
267269
})
268270
.on('mouseover', tip.show)
269271
.on('mouseout', tip.hide)

src/app/minicharts/querybuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ module.exports = {
586586
* @return {Any} value to be returned that can be used for comparisons < and >
587587
*/
588588
_getOrderedValueHelper: function(d) {
589-
if (!d._bsontype) {
589+
if (!d || !d._bsontype) {
590590
return d;
591591
}
592592
return d._bsontype === 'ObjectID' ? d.getTimestamp() : d;

0 commit comments

Comments
 (0)