Skip to content
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

VLBridge does not update charts with filter #650

Open
AdriSolid opened this issue Sep 9, 2019 · 3 comments
Open

VLBridge does not update charts with filter #650

AdriSolid opened this issue Sep 9, 2019 · 3 comments

Comments

@AdriSolid
Copy link

Hi all,

First of all, I have to say that VLBridge saved me a lot of work, thanks.

Everything works fine except if you add a 'filter' in 'Viz'. The charts don't update following the filter you define, it ignores the 'filter' (the map is updated correctly instead).

Below an example:
https://codepen.io/AdriSolid/pen/wvwyRON

Cheers!

@VictorVelarde
Copy link
Contributor

Please @CartoDB/rt-managers add this to RT

/cc @rjimenezda

@rjimenezda
Copy link
Contributor

Hi, thank you for using Airship, and it's great you found the bridge useful.

Unfortunately, this is a design choice, not a bug. If you want to use the bridge you cannot really use Viz filters alongside with it, you must leave all the filtering to the bridge.

This was done to simplify the code, but we can use this issue to track any attempts to add this functionality. Theoretically we could try and read the initial filter, or add a way for the bridge to accept "external filters" that the user can define. It's uncharted territory, though

In this particular case you've shared, what you could do is filter at the source. Instead of using a carto.source.Dataset, use a SQL source

carto.source.SQL(`SELECT * from ne_10m_airports where location='terminal'`);

This is not as helpful as using Viz filters, but it might help in some cases.

@AdriSolid
Copy link
Author

I tried to use SQL source instead, the problem remains in the update. Whether you update the SQL source using the 'update' method or even the 'blendToViz' using Viz filter, it does not work neither. As you know, is much better to use Viz filters and filter the protobuf with the smooth transitions.

Would like to extend the library.. For the moment I managed to use 'raw' Airship charts extracting the data from 'viewportHistogram'.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants