@@ -4,6 +4,7 @@ import { scaleQuantile } from "d3-scale";
4
4
import ReactTooltip from "react-tooltip" ;
5
5
import LinearGradient from "./LinearGradient.js" ;
6
6
import INDIA_TOPO_JSON from "./india.topo.json" ;
7
+ import "./Map.css" ;
7
8
8
9
/**
9
10
* Courtesy: https://rawgit.com/Anujarya300/bubble_maps/master/data/geography-data/india.topo.json
@@ -31,10 +32,6 @@ const COLOR_RANGE = [
31
32
32
33
const DEFAULT_COLOR = "#EEE" ;
33
34
34
- const getRandomInt = ( ) => {
35
- return parseInt ( Math . random ( ) * 100 ) ;
36
- } ;
37
-
38
35
const geographyStyle = {
39
36
default : {
40
37
outline : "none" ,
@@ -55,8 +52,8 @@ class Map extends Component {
55
52
this . state = {
56
53
tooltipContent : "" ,
57
54
data : [
58
- { id : "AP" , state : "Andhra Pradesh" , value : getRandomInt ( ) } ,
59
- { id : "AR" , state : "Arunachal Pradesh" , value : getRandomInt ( ) } ,
55
+ { id : "AP" , state : "Andhra Pradesh" , value : 5 } ,
56
+ { id : "AR" , state : "Arunachal Pradesh" , value : 2 } ,
60
57
] ,
61
58
} ;
62
59
}
@@ -87,7 +84,7 @@ class Map extends Component {
87
84
. range ( COLOR_RANGE ) ;
88
85
89
86
return (
90
- < div className = "full-width-height container" >
87
+ < div className = "container" >
91
88
< ReactTooltip > { this . state . tooltipContent } </ ReactTooltip >
92
89
< ComposableMap
93
90
projectionConfig = { PROJECTION_CONFIG }
0 commit comments