This is an automated email from the ASF dual-hosted git repository. villebro pushed a commit to branch 1.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit b90ac851adc223122ea4f27e380386bea230361d Author: bryanck <[email protected]> AuthorDate: Thu Jan 21 23:00:58 2021 -0800 add order by for bar charts (#12661) Co-authored-by: Bryan Keller <[email protected]> --- superset/viz.py | 1 + 1 file changed, 1 insertion(+) diff --git a/superset/viz.py b/superset/viz.py index 37fb490..7d9a7bb 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -1684,6 +1684,7 @@ class DistributionBarViz(BaseViz): raise QueryObjectValidationError(_("Pick at least one metric")) if not fd.get("groupby"): raise QueryObjectValidationError(_("Pick at least one field for [Series]")) + d["orderby"] = [(d["metrics"][0], False)] return d def get_data(self, df: pd.DataFrame) -> VizData:
