Skip to content

Commit

Permalink
remove d3.scale.threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Nov 9, 2018
1 parent 178631c commit 1c28541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/assets/src/visualizations/deckgl/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import d3 from 'd3';
import { extent } from 'd3-array';
import { scaleThreshold } from 'd3-scale';
import { getSequentialSchemeRegistry } from '@superset-ui/color';
import { colorScalerFactory, hexToRGB } from '../../modules/colors';

Expand Down Expand Up @@ -61,7 +61,7 @@ export function getBreakPointColorScaler({
bucketedColors.push(bucketedColors[n - 1]);

const points = breakPoints.map(p => parseFloat(p));
scaler = d3.scale.threshold().domain(points).range(bucketedColors);
scaler = scaleThreshold().domain(points).range(bucketedColors);
maskPoint = value => value > breakPoints[n] || value < breakPoints[0];
} else {
// interpolate colors linearly
Expand Down

0 comments on commit 1c28541

Please sign in to comment.