From 1d2b599944f7757849c70e3a87759b82c987d70d Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sun, 11 Jun 2017 09:11:10 -0700 Subject: [PATCH] [table viz] get metrics to right-align 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 dcbcd9ac740f..be1a82c6234d 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);