summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeyorp <TheFreeYorp@NOSPAM.G.m.a.i.l.replace>2013-05-28 12:50:17 +1200
committerFreeyorp <TheFreeYorp@NOSPAM.G.m.a.i.l.replace>2013-05-28 12:50:17 +1200
commit4d89ed1f0ceb5632e0a76671a82114f8cde16a0f (patch)
treee0098ac6295efa358b75f5d03bc1f59a48628abe
parent276ac8a19d1ddcdcbf1d43515e9af770984e9d81 (diff)
downloadmanavis-4d89ed1f0ceb5632e0a76671a82114f8cde16a0f.tar.gz
manavis-4d89ed1f0ceb5632e0a76671a82114f8cde16a0f.tar.bz2
manavis-4d89ed1f0ceb5632e0a76671a82114f8cde16a0f.tar.xz
manavis-4d89ed1f0ceb5632e0a76671a82114f8cde16a0f.zip
Apply filters from trellis brushes
No broadcasting functionality yet.
-rw-r--r--public/js/util/trellis-chart.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/public/js/util/trellis-chart.js b/public/js/util/trellis-chart.js
index 97dcc98..bad1cb4 100644
--- a/public/js/util/trellis-chart.js
+++ b/public/js/util/trellis-chart.js
@@ -166,6 +166,7 @@ function trellisChart(anchor, monoGroups) {
d.brush = d3.svg.brush();
d.filter = function(_) {
if (!arguments.length) return d._filter;
+ d.dim.filter(_);
d._filter = _;
return d;
};
@@ -265,12 +266,12 @@ function trellisChart(anchor, monoGroups) {
if (brushIsEmpty(extent, d.brush)) {
dc.events.trigger(function () {
- _chart.filter(null);
+ d.filter(null);
dc.redrawAll();
});
} else {
dc.events.trigger(function () {
- _chart.filter([extent[0], extent[1]]);
+ d.filter([extent[0], extent[1]]);
dc.redrawAll();
}, dc.constants.EVENT_DELAY);
}
@@ -326,14 +327,17 @@ function trellisChart(anchor, monoGroups) {
+ "V" + (2 * y - 8);
}
- _chart.filter = function() {
+ _chart.filter = function(_) {
/*
* TODO:
* This is going to be interesting. As the chart is not charting a single
* monogroup, and most code is built around this assumption, this might
* well end up being a messy special case.
*/
- return null;
+ if (!arguments.length) {
+ return null;
+ }
+ return _chart;
}
return _chart;