Skip to content

Commit

Permalink
[table viz] get metrics to right-align
Browse files Browse the repository at this point in the history
Moved the histogram to be rooted on the right side as well

fixes #2933
  • Loading branch information
mistercrunch committed Jun 11, 2017
1 parent 16141ec commit 1d2b599
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/assets/visualizations/table.js
Expand Up @@ -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);
Expand Down

0 comments on commit 1d2b599

Please sign in to comment.