Skip to content

Commit b98355f

Browse files
rueckstiesskangas
authored andcommitted
INT-197 removing field names from document/array minichart
there can be arbitrary many and of arbitrary length. makes it really difficult to display them cleanly. They are also easily accessible by expanding the field.
1 parent 624c92a commit b98355f

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

src/minicharts/array-root.jade

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
div(data-hook='viz-container')
22
dl
3-
if fieldNames
4-
dt Array of documents with #{fieldsPluralized}
3+
if fieldNames
4+
dt Array of documents with #{fieldsPluralized}
5+
dd
6+
7+
dt Array lengths
58
dd
69
ul.list-inline
7-
each name, idx in fieldNames
8-
li= name + (idx < fieldNames.length-1 ? ',' : '')
9-
dt Array lengths
10-
dd
11-
ul.list-inline
12-
li min: #{min_length},
13-
li average: #{average_length},
14-
li max: #{max_length}
10+
li min: #{min_length},
11+
li average: #{average_length},
12+
li max: #{max_length}

src/minicharts/document-root.jade

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
div(data-hook='viz-container')
22
dl
3-
dt Document with #{fieldsPluralized}
4-
dd
5-
ul.list-inline
6-
each name, idx in fieldNames
7-
li= name + (idx < fieldNames.length-1 ? ',' : '')
8-
9-
3+
dt Document with #{fieldsPluralized}
4+
dd

src/minicharts/document-root.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = VizView.extend({
77
render: function() {
88
var fieldNames = this.model.parent.fields.pluck('name');
99
this.renderWithTemplate({
10-
fieldNames: fieldNames,
1110
fieldsPluralized: pluralize('nested field', fieldNames.length, true)
1211
});
1312
}

src/minicharts/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module.exports = AmpersandView.extend(QueryBuilderMixin, {
5555
this.subview = new DocumentRootMinichartView(this.viewOptions);
5656
} else if (this.model.name === 'Array') {
5757
// arrays get a div-based ArrayRootMinichart
58+
this.viewOptions.height = 55;
5859
this.subview = new ArrayRootMinichartView(this.viewOptions);
5960
} else {
6061
// otherwise, create a svg-based VizView for d3

0 commit comments

Comments
 (0)