mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
Use ColorPalette instead
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
@lightgrey: rgb(211, 211, 211);
|
||||
@lightblue: rgb(135, 206, 250);
|
||||
|
||||
.funnel-visualization-container {
|
||||
table {
|
||||
max-width: 800px;
|
||||
@@ -11,11 +8,9 @@
|
||||
}
|
||||
div.bar {
|
||||
height: 30px;
|
||||
background-color: @lightgrey;
|
||||
}
|
||||
div.bar.centered {
|
||||
margin: auto;
|
||||
background-color: @lightblue;
|
||||
}
|
||||
.value {
|
||||
position: absolute;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { debounce, sortBy } from 'underscore';
|
||||
import d3 from 'd3';
|
||||
import angular from 'angular';
|
||||
|
||||
import { ColorPalette } from '@/visualizations/chart/plotly/utils';
|
||||
import editorTemplate from './funnel-editor.html';
|
||||
import './funnel.less';
|
||||
|
||||
@@ -46,6 +47,7 @@ function Funnel(scope, element) {
|
||||
.style('min-width', '200px');
|
||||
valContainers.append('div')
|
||||
.attr('class', 'bar centered')
|
||||
.style('background-color', ColorPalette.Cyan)
|
||||
.style('width', d => d.pctTotal + '%');
|
||||
valContainers.append('div')
|
||||
.attr('class', 'value')
|
||||
@@ -63,6 +65,8 @@ function Funnel(scope, element) {
|
||||
.attr('class', 'container');
|
||||
pctContainers.append('div')
|
||||
.attr('class', 'bar')
|
||||
.style('background-color', ColorPalette.Gray)
|
||||
.style('opacity', '0.2')
|
||||
.style('width', d => d.pctPrevious.toFixed(2) + '%');
|
||||
pctContainers.append('div')
|
||||
.attr('class', 'value')
|
||||
|
||||
Reference in New Issue
Block a user