-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of selected() function #14
Comments
Hi Josh,
Please never worry about your Javascript skills (How can a man know everything?) You're always welcomed to submit issues here. |
Thanks for the quick reply! On line 167 of parcoords.js I'm seeing: // data within extents
var selected = function selected(state, config, brushGroup) and on line 3092 as a part of the pc.selected = selected$4(config); There is also a file for this This |
This is indeed a bug.
|
This is a dream come true! The only thing I'm noticing here is that |
Another strange thing happens when working with two ParCoords variables: var pc1 = ParCoords()("#plot01")
.alpha(0.4)
var pc2 = ParCoords()("#plot02")
.alpha(0.4)
// load csv file and create the chart
d3.csv('data/cars.csv').then(function(data) {
pc1
.data(data)
.hideAxis(["name"])
.composite("darker")
.render()
.shadows()
.reorderable()
.brushMode("1D-axes") // enable brushing
.on("brushend", function(){
console.log(pc1.selected());
console.log(pc2.selected());
});
pc2
.data(data)
.hideAxis(["name"])
.composite("darker")
.render()
.shadows()
.reorderable()
.brushMode("1D-axes") // enable brushing
.on("brushend", function(){
console.log(pc1.selected());
console.log(pc2.selected());
});
});
d3.select('#brushReset').on('click', function () {
pc1.brushReset();
pc2.brushReset();
}); The two plots seem to be linked, in that Interestingly, you must also click the brushReset button twice in order for both plots to refresh. |
2.1.1 has been released with the |
The two more bugs that you've found are tracked in:
|
Hi,
I'm trying to use
pc.selected()
to return all data within brush extents ("1d-axes"). For example,However, I get a "TypeError: pc.selected is not a function"
Am I using this function correctly? If not, how else could I obtain all data within the brush extents as an array? Apologies if the solution is obvious, I'm still new to Javascript. Thanks!
The text was updated successfully, but these errors were encountered: