From 0d2c2b0681a8b9558de97d5391a7d985da90cc04 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 12 Jun 2017 13:35:00 -0700 Subject: [PATCH] [table viz] get metrics to right-align (#2943) Moved the histogram to be rooted on the right side as well fixes https://github.com/airbnb/superset/issues/2933 --- superset/assets/visualizations/table.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/assets/visualizations/table.js b/superset/assets/visualizations/table.js index dcbcd9ac740..be1a82c6234 100644 --- a/superset/assets/visualizations/table.js +++ b/superset/assets/visualizations/table.js @@ -94,12 +94,13 @@ function tableVis(slice, payload) { // The 0.01 to 0.001 is a workaround for what appears to be a // CSS rendering bug on flat, transparent colors return ( - `linear-gradient(to right, rgba(0,0,0,0.2), rgba(0,0,0,0.2) ${perc}%, ` + + `linear-gradient(to left, rgba(0,0,0,0.2), rgba(0,0,0,0.2) ${perc}%, ` + `rgba(0,0,0,0.01) ${perc}%, rgba(0,0,0,0.001) 100%)` ); } return null; }) + .classed('text-right', d => d.isMetric) .attr('title', (d) => { if (!isNaN(d.val)) { return fC(d.val);