@@ -4,6 +4,7 @@ import { scaleQuantile } from "d3-scale";
44import ReactTooltip from "react-tooltip" ;
55import LinearGradient from "./LinearGradient.js" ;
66import INDIA_TOPO_JSON from "./india.topo.json" ;
7+ import "./Map.css" ;
78
89/**
910 * Courtesy: https://rawgit.com/Anujarya300/bubble_maps/master/data/geography-data/india.topo.json
@@ -31,10 +32,6 @@ const COLOR_RANGE = [
3132
3233const DEFAULT_COLOR = "#EEE" ;
3334
34- const getRandomInt = ( ) => {
35- return parseInt ( Math . random ( ) * 100 ) ;
36- } ;
37-
3835const geographyStyle = {
3936 default : {
4037 outline : "none" ,
@@ -55,8 +52,8 @@ class Map extends Component {
5552 this . state = {
5653 tooltipContent : "" ,
5754 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 } ,
6057 ] ,
6158 } ;
6259 }
@@ -87,7 +84,7 @@ class Map extends Component {
8784 . range ( COLOR_RANGE ) ;
8885
8986 return (
90- < div className = "full-width-height container" >
87+ < div className = "container" >
9188 < ReactTooltip > { this . state . tooltipContent } </ ReactTooltip >
9289 < ComposableMap
9390 projectionConfig = { PROJECTION_CONFIG }
0 commit comments