@reltio/components 1.4.1047 → 1.4.1048

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,18 +52,7 @@ var classnames_1 = __importDefault(require("classnames"));
52
52
  var styles_1 = require("./styles");
53
53
  var useClickableStyle_1 = require("../hooks/useClickableStyle");
54
54
  var USA_MAP = 'https://s3.amazonaws.com/reltio-ui-files/map_resources/us-albers.json';
55
- var MAP_COLORS = [
56
- '#9BC1FE',
57
- '#84B5F7',
58
- '#65A6EE',
59
- '#3C91E1',
60
- '#388EDF',
61
- '#1B80D7',
62
- '#1D72BB',
63
- '#146CB7',
64
- '#0F69B4',
65
- '#0160AD'
66
- ];
55
+ var MAP_COLORS = ['#CDE0FE', '#0160AD'];
67
56
  exports.LEGEND_WIDTH = 75;
68
57
  var MapChart = function (_a) {
69
58
  var data = _a.data, width = _a.width, height = _a.height, options = _a.options, onItemClick = _a.onItemClick;
@@ -73,7 +62,7 @@ var MapChart = function (_a) {
73
62
  var minValue = Math.min.apply(Math, values);
74
63
  var maxValue = Math.max.apply(Math, values);
75
64
  var mapWidth = width < exports.LEGEND_WIDTH ? 0 : width - (showLegend ? 1 : 0) * exports.LEGEND_WIDTH;
76
- var colorScale = d3_scale_1.scaleQuantize().domain([minValue, maxValue]).range(MAP_COLORS);
65
+ var colorScale = d3_scale_1.scaleLog().domain([minValue, maxValue]).range(MAP_COLORS);
77
66
  var geography = useGeography_1.default(geoUrl || USA_MAP);
78
67
  var projection = geoUrl ? options.projection : 'geoAlbersUsa';
79
68
  var projectionFunc = react_1.useMemo(function () {
@@ -14,7 +14,7 @@ import withPercents from '../HOCs/withPercents';
14
14
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
15
  // @ts-ignore
16
16
  import { Geographies, Geography, MapProvider } from 'react-simple-maps';
17
- import { scaleQuantize } from 'd3-scale';
17
+ import { scaleLog } from 'd3-scale';
18
18
  import * as d3Geo from 'd3-geo';
19
19
  import { feature } from 'topojson-client';
20
20
  import useGeography from './useGeography';
@@ -27,18 +27,7 @@ import classnames from 'classnames';
27
27
  import { useStyles } from './styles';
28
28
  import { useClickableStyle } from '../hooks/useClickableStyle';
29
29
  var USA_MAP = 'https://s3.amazonaws.com/reltio-ui-files/map_resources/us-albers.json';
30
- var MAP_COLORS = [
31
- '#9BC1FE',
32
- '#84B5F7',
33
- '#65A6EE',
34
- '#3C91E1',
35
- '#388EDF',
36
- '#1B80D7',
37
- '#1D72BB',
38
- '#146CB7',
39
- '#0F69B4',
40
- '#0160AD'
41
- ];
30
+ var MAP_COLORS = ['#CDE0FE', '#0160AD'];
42
31
  export var LEGEND_WIDTH = 75;
43
32
  export var MapChart = function (_a) {
44
33
  var data = _a.data, width = _a.width, height = _a.height, options = _a.options, onItemClick = _a.onItemClick;
@@ -48,7 +37,7 @@ export var MapChart = function (_a) {
48
37
  var minValue = Math.min.apply(Math, values);
49
38
  var maxValue = Math.max.apply(Math, values);
50
39
  var mapWidth = width < LEGEND_WIDTH ? 0 : width - (showLegend ? 1 : 0) * LEGEND_WIDTH;
51
- var colorScale = scaleQuantize().domain([minValue, maxValue]).range(MAP_COLORS);
40
+ var colorScale = scaleLog().domain([minValue, maxValue]).range(MAP_COLORS);
52
41
  var geography = useGeography(geoUrl || USA_MAP);
53
42
  var projection = geoUrl ? options.projection : 'geoAlbersUsa';
54
43
  var projectionFunc = useMemo(function () {
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1047",
3
+ "version": "1.4.1048",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
7
7
  "dependencies": {
8
8
  "@date-io/moment": "^1.3.5",
9
9
  "@react-google-maps/api": "2.7.0",
10
- "@reltio/mdm-module": "^1.4.1047",
11
- "@reltio/mdm-sdk": "^1.4.1047",
10
+ "@reltio/mdm-module": "^1.4.1048",
11
+ "@reltio/mdm-sdk": "^1.4.1048",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",