You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2017/12/26 18:10:23 UTC
[GitHub] hughhhh commented on a change in pull request #4096: Multi layers DECK.GL visualization
hughhhh commented on a change in pull request #4096: Multi layers DECK.GL visualization
URL: https://github.com/apache/incubator-superset/pull/4096#discussion_r158728276
##########
File path: superset/viz.py
##########
@@ -1768,6 +1770,35 @@ def get_data(self, df):
}
+class DeckGLMultiLayer(BaseViz):
+
+ """Pile on multiple DeckGL layers"""
+
+ viz_type = 'deck_multi'
+ verbose_name = _('Deck.gl - Multiple Layers')
+
+ is_timeseries = False
+ credits = '<a href="https://uber.github.io/deck.gl/">deck.gl</a>'
+
+ def query_obj(self):
+ return None
+
+ def get_data(self, df):
+ fd = self.form_data
+ # Late imports to avoid circular import issues
+ from superset.models.core import Slice
+ from superset import db
+ slice_ids = fd.get('deck_slices')
+ slices = db.session.query(Slice).filter(Slice.id.in_(slice_ids)).all()
+ data = []
+ for slc in slices:
Review comment:
nit: `data = [slc for slc in slices]`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services