Skip to content

Commit

Permalink
Don't limit parallel coordinates table size (apache#455)
Browse files Browse the repository at this point in the history
Before we limited the table size to 10 rows, now there's no limit and it
will overflow properly with a scrollbar.
  • Loading branch information
mistercrunch committed May 12, 2016
1 parent aa6e6bd commit 52bbb38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions caravel/assets/stylesheets/parallel_coordinates.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.para div.grid {
overflow: auto;
}

.para div.row:hover {
background-color: #CCC;
}
11 changes: 6 additions & 5 deletions caravel/assets/visualizations/parallel_coordinates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ d3.divgrid = require('../vendor/parallel_coordinates/divgrid.js');

// CSS
require('../vendor/parallel_coordinates/d3.parcoords.css');
require('../stylesheets/parallel_coordinates.css');

function parallelCoordVis(slice) {

Expand Down Expand Up @@ -66,10 +67,10 @@ function parallelCoordVis(slice) {
// create data table, row hover highlighting
var grid = d3.divgrid();
container.append("div")
.datum(data.slice(0, 10))
.attr('id', "grid")
.style('height', eff_height + 'px')
.datum(data)
.call(grid)
.classed("parcoords", true)
.classed("parcoords grid", true)
.selectAll(".row")
.on({
mouseover: function (d) {
Expand All @@ -79,8 +80,8 @@ function parallelCoordVis(slice) {
});
// update data table on brush event
parcoords.on("brush", function (d) {
d3.select("#grid")
.datum(d.slice(0, 10))
d3.select(".grid")
.datum(d)
.call(grid)
.selectAll(".row")
.on({
Expand Down

0 comments on commit 52bbb38

Please sign in to comment.