jeffreythewang commented on a change in pull request #4185: Add new 
visualization for custom X-Y axes
URL: 
https://github.com/apache/incubator-superset/pull/4185#discussion_r162757496
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -901,6 +901,82 @@ def get_data(self, df):
         }
 
 
+class NVD3LineXYViz(NVD3Viz):
+
+    """A rich line chart component with customizable X & Y axes"""
+
+    viz_type = 'line_xy'
+    verbose_name = _('XY Line Chart')
+    sort_series = False
+    is_timeseries = True
 
 Review comment:
   This is primarily used as a small hack to implement limiting on the 
`groupBy` groupings, using the limit as the `timeseries_limit` in the query 
objects. The limit is applied on the subquery in the case of `sqla`, and the 
first phase in the case of the `druid` query.
   
   The reason why limiting should be applied is so that, in some cases, the 
visualization doesn't come out as a large number of lines, which would crash 
the browser.
   
   I realize it probably makes more sense to limit the result set after running 
the query, limiting on the `sliceBy` field, but I'm open to suggestions here. 
We can also forego implementing limiting for now, and encourage users to apply 
proper filters on their queries. Otherwise I'll leave it the way it is now and 
include a comment in the code.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to