Skip to content

Commit d7096f4

Browse files
rueckstiesskangas
authored andcommitted
INT-1243 correct has_duplicate detection, date minichart for 1000 docs
1 parent 50e498c commit d7096f4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/app/minicharts/d3fns/coordinates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var minicharts_d3fns_coordinates = function() {
1818
var options = {
1919
view: null
2020
};
21-
var margin = shared.margin;
21+
var margin = _.copy(shared.margin);
2222
margin.bottom = 20;
2323

2424
var xScale = d3.scale.linear();

src/app/minicharts/d3fns/date.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var moment = require('moment');
66
var shared = require('./shared');
77
var many = require('./many');
88
var raf = require('raf');
9+
910
// var debug = require('debug')('mongodb-compass:minicharts:date');
1011

1112
require('../d3-tip')(d3);
@@ -261,6 +262,9 @@ var minicharts_d3fns_date = function() {
261262

262263
lines.enter().append('line')
263264
.attr('class', 'line selectable')
265+
.style('opacity', function() {
266+
return values.length > 100 ? 0.3 : 1.0;
267+
})
264268
.on('mouseover', tip.show)
265269
.on('mouseout', tip.hide)
266270
.on('mousedown', handleMouseDown);

src/app/minicharts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module.exports = AmpersandView.extend(QueryBuilderMixin, {
143143
this.subview = new VizView(this.viewOptions);
144144
}
145145
} else if (['String', 'Number'].indexOf(this.model.name) !== -1
146-
&& this.model.unique === this.model.count) {
146+
&& !this.model.has_duplicates) {
147147
// unique values get a div-based UniqueMinichart
148148
this.viewOptions.renderMode = 'html';
149149
this.viewOptions.vizFn = null;

0 commit comments

Comments
 (0)