• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <script>
    15. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    16. zingchart.loadModules('maps, maps-usa', function(e) {
    17. zingchart.render({
    18. id: 'myChart',
    19. data: {
    20. shapes: [{
    21. type: 'zingchart.maps',
    22. options: {
    23. name: 'usa',
    24. style: {
    25. items: {
    26.  
    27. //Northeast:
    28. CT: {
    29. group: 1,
    30. backgroundColor: '#FFCDD2',
    31. hoverState: {
    32. backgroundColor: '#EF9A9A'
    33. }
    34. },
    35. ME: {
    36. group: 1,
    37. backgroundColor: '#FFCDD2',
    38. hoverState: {
    39. backgroundColor: '#EF9A9A'
    40. }
    41. },
    42. MA: {
    43. group: 1,
    44. backgroundColor: '#FFCDD2',
    45. hoverState: {
    46. backgroundColor: '#EF9A9A'
    47. }
    48. },
    49. NH: {
    50. group: 1,
    51. backgroundColor: '#FFCDD2',
    52. hoverState: {
    53. backgroundColor: '#EF9A9A'
    54. }
    55. },
    56. RI: {
    57. group: 1,
    58. backgroundColor: '#FFCDD2',
    59. hoverState: {
    60. backgroundColor: '#EF9A9A'
    61. }
    62. },
    63. VT: {
    64. group: 1,
    65. backgroundColor: '#FFCDD2',
    66. hoverState: {
    67. backgroundColor: '#EF9A9A'
    68. }
    69. },
    70. DE: {
    71. group: 1,
    72. backgroundColor: '#FFCDD2',
    73. hoverState: {
    74. backgroundColor: '#EF9A9A'
    75. }
    76. },
    77. NJ: {
    78. group: 1,
    79. backgroundColor: '#FFCDD2',
    80. hoverState: {
    81. backgroundColor: '#EF9A9A'
    82. }
    83. },
    84. NY: {
    85. group: 1,
    86. backgroundColor: '#FFCDD2',
    87. hoverState: {
    88. backgroundColor: '#EF9A9A'
    89. }
    90. },
    91. PA: {
    92. group: 1,
    93. backgroundColor: '#FFCDD2',
    94. hoverState: {
    95. backgroundColor: '#EF9A9A'
    96. }
    97. },
    98.  
    99. //Midwest:
    100. IL: {
    101. group: 2,
    102. backgroundColor: '#FFE0B2',
    103. hoverState: {
    104. backgroundColor: '#FFB74D'
    105. }
    106. },
    107. IN: {
    108. group: 2,
    109. backgroundColor: '#FFE0B2',
    110. hoverState: {
    111. backgroundColor: '#FFB74D'
    112. }
    113. },
    114. MI: {
    115. group: 2,
    116. backgroundColor: '#FFE0B2',
    117. hoverState: {
    118. backgroundColor: '#FFB74D'
    119. }
    120. },
    121. OH: {
    122. group: 2,
    123. backgroundColor: '#FFE0B2',
    124. hoverState: {
    125. backgroundColor: '#FFB74D'
    126. }
    127. },
    128. WI: {
    129. group: 2,
    130. backgroundColor: '#FFE0B2',
    131. hoverState: {
    132. backgroundColor: '#FFB74D'
    133. }
    134. },
    135. IA: {
    136. group: 2,
    137. backgroundColor: '#FFE0B2',
    138. hoverState: {
    139. backgroundColor: '#FFB74D'
    140. }
    141. },
    142. KS: {
    143. group: 2,
    144. backgroundColor: '#FFE0B2',
    145. hoverState: {
    146. backgroundColor: '#FFB74D'
    147. }
    148. },
    149. MN: {
    150. group: 2,
    151. backgroundColor: '#FFE0B2',
    152. hoverState: {
    153. backgroundColor: '#FFB74D'
    154. }
    155. },
    156. MO: {
    157. group: 2,
    158. backgroundColor: '#FFE0B2',
    159. hoverState: {
    160. backgroundColor: '#FFB74D'
    161. }
    162. },
    163. NE: {
    164. group: 2,
    165. backgroundColor: '#FFE0B2',
    166. hoverState: {
    167. backgroundColor: '#FFB74D'
    168. }
    169. },
    170. ND: {
    171. group: 2,
    172. backgroundColor: '#FFE0B2',
    173. hoverState: {
    174. backgroundColor: '#FFB74D'
    175. }
    176. },
    177. SD: {
    178. group: 2,
    179. backgroundColor: '#FFE0B2',
    180. hoverState: {
    181. backgroundColor: '#FFB74D'
    182. }
    183. },
    184.  
    185. //South:
    186. FL: {
    187. group: 3,
    188. backgroundColor: '#C8E6C9',
    189. hoverState: {
    190. backgroundColor: '#81C784'
    191. }
    192. },
    193. GA: {
    194. group: 3,
    195. backgroundColor: '#C8E6C9',
    196. hoverState: {
    197. backgroundColor: '#81C784'
    198. }
    199. },
    200. MD: {
    201. group: 3,
    202. backgroundColor: '#C8E6C9',
    203. hoverState: {
    204. backgroundColor: '#81C784'
    205. }
    206. },
    207. NC: {
    208. group: 3,
    209. backgroundColor: '#C8E6C9',
    210. hoverState: {
    211. backgroundColor: '#81C784'
    212. }
    213. },
    214. SC: {
    215. group: 3,
    216. backgroundColor: '#C8E6C9',
    217. hoverState: {
    218. backgroundColor: '#81C784'
    219. }
    220. },
    221. VA: {
    222. group: 3,
    223. backgroundColor: '#C8E6C9',
    224. hoverState: {
    225. backgroundColor: '#81C784'
    226. }
    227. },
    228. DC: {
    229. group: 3,
    230. backgroundColor: '#C8E6C9',
    231. hoverState: {
    232. backgroundColor: '#81C784'
    233. }
    234. },
    235. WV: {
    236. group: 3,
    237. backgroundColor: '#C8E6C9',
    238. hoverState: {
    239. backgroundColor: '#81C784'
    240. }
    241. },
    242. AL: {
    243. group: 3,
    244. backgroundColor: '#C8E6C9',
    245. hoverState: {
    246. backgroundColor: '#81C784'
    247. }
    248. },
    249. KY: {
    250. group: 3,
    251. backgroundColor: '#C8E6C9',
    252. hoverState: {
    253. backgroundColor: '#81C784'
    254. }
    255. },
    256. MS: {
    257. group: 3,
    258. backgroundColor: '#C8E6C9',
    259. hoverState: {
    260. backgroundColor: '#81C784'
    261. }
    262. },
    263. TN: {
    264. group: 3,
    265. backgroundColor: '#C8E6C9',
    266. hoverState: {
    267. backgroundColor: '#81C784'
    268. }
    269. },
    270. AR: {
    271. group: 3,
    272. backgroundColor: '#C8E6C9',
    273. hoverState: {
    274. backgroundColor: '#81C784'
    275. }
    276. },
    277. LA: {
    278. group: 3,
    279. backgroundColor: '#C8E6C9',
    280. hoverState: {
    281. backgroundColor: '#81C784'
    282. }
    283. },
    284. OK: {
    285. group: 3,
    286. backgroundColor: '#C8E6C9',
    287. hoverState: {
    288. backgroundColor: '#81C784'
    289. }
    290. },
    291. TX: {
    292. group: 3,
    293. backgroundColor: '#C8E6C9',
    294. hoverState: {
    295. backgroundColor: '#81C784'
    296. }
    297. },
    298.  
    299. //West:
    300. AZ: {
    301. group: 4,
    302. backgroundColor: '#BBDEFB',
    303. hoverState: {
    304. backgroundColor: '#64B5F6'
    305. }
    306. },
    307. CO: {
    308. group: 4,
    309. backgroundColor: '#BBDEFB',
    310. hoverState: {
    311. backgroundColor: '#64B5F6'
    312. }
    313. },
    314. ID: {
    315. group: 4,
    316. backgroundColor: '#BBDEFB',
    317. hoverState: {
    318. backgroundColor: '#64B5F6'
    319. }
    320. },
    321. MT: {
    322. group: 4,
    323. backgroundColor: '#BBDEFB',
    324. hoverState: {
    325. backgroundColor: '#64B5F6'
    326. }
    327. },
    328. NV: {
    329. group: 4,
    330. backgroundColor: '#BBDEFB',
    331. hoverState: {
    332. backgroundColor: '#64B5F6'
    333. }
    334. },
    335. NM: {
    336. group: 4,
    337. backgroundColor: '#BBDEFB',
    338. hoverState: {
    339. backgroundColor: '#64B5F6'
    340. }
    341. },
    342. UT: {
    343. group: 4,
    344. backgroundColor: '#BBDEFB',
    345. hoverState: {
    346. backgroundColor: '#64B5F6'
    347. }
    348. },
    349. WY: {
    350. group: 4,
    351. backgroundColor: '#BBDEFB',
    352. hoverState: {
    353. backgroundColor: '#64B5F6'
    354. }
    355. },
    356. AK: {
    357. group: 4,
    358. backgroundColor: '#BBDEFB',
    359. hoverState: {
    360. backgroundColor: '#64B5F6'
    361. }
    362. },
    363. CA: {
    364. group: 4,
    365. backgroundColor: '#BBDEFB',
    366. hoverState: {
    367. backgroundColor: '#64B5F6'
    368. }
    369. },
    370. HI: {
    371. group: 4,
    372. backgroundColor: '#BBDEFB',
    373. hoverState: {
    374. backgroundColor: '#64B5F6'
    375. }
    376. },
    377. OR: {
    378. group: 4,
    379. backgroundColor: '#BBDEFB',
    380. hoverState: {
    381. backgroundColor: '#64B5F6'
    382. }
    383. },
    384. WA: {
    385. group: 4,
    386. backgroundColor: '#BBDEFB',
    387. hoverState: {
    388. backgroundColor: '#64B5F6'
    389. }
    390. }
    391. },
    392. tooltip: {
    393. alpha: 0.5,
    394. backgroundColor: 'white',
    395. borderColor: 'white',
    396. borderRadius: 3,
    397. fontColor: 'black',
    398. fontFamily: 'Georgia',
    399. fontSize: 12,
    400. textAlpha: 1
    401. }
    402. }
    403. }
    404. }]
    405. },
    406. height: 400,
    407. width: '100%'
    408. });
    409. });
    410. </script>
    411. </body>
    412.  
    413. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id='myChart'></div>
    13. </body>
    14.  
    15. </html>
    1.  
    1. zingchart.loadModules('maps, maps-usa', function(e) {
    2. zingchart.render({
    3. id: 'myChart',
    4. data: {
    5. shapes: [{
    6. type: 'zingchart.maps',
    7. options: {
    8. name: 'usa',
    9. style: {
    10. items: {
    11.  
    12. //Northeast:
    13. CT: {
    14. group: 1,
    15. backgroundColor: '#FFCDD2',
    16. hoverState: {
    17. backgroundColor: '#EF9A9A'
    18. }
    19. },
    20. ME: {
    21. group: 1,
    22. backgroundColor: '#FFCDD2',
    23. hoverState: {
    24. backgroundColor: '#EF9A9A'
    25. }
    26. },
    27. MA: {
    28. group: 1,
    29. backgroundColor: '#FFCDD2',
    30. hoverState: {
    31. backgroundColor: '#EF9A9A'
    32. }
    33. },
    34. NH: {
    35. group: 1,
    36. backgroundColor: '#FFCDD2',
    37. hoverState: {
    38. backgroundColor: '#EF9A9A'
    39. }
    40. },
    41. RI: {
    42. group: 1,
    43. backgroundColor: '#FFCDD2',
    44. hoverState: {
    45. backgroundColor: '#EF9A9A'
    46. }
    47. },
    48. VT: {
    49. group: 1,
    50. backgroundColor: '#FFCDD2',
    51. hoverState: {
    52. backgroundColor: '#EF9A9A'
    53. }
    54. },
    55. DE: {
    56. group: 1,
    57. backgroundColor: '#FFCDD2',
    58. hoverState: {
    59. backgroundColor: '#EF9A9A'
    60. }
    61. },
    62. NJ: {
    63. group: 1,
    64. backgroundColor: '#FFCDD2',
    65. hoverState: {
    66. backgroundColor: '#EF9A9A'
    67. }
    68. },
    69. NY: {
    70. group: 1,
    71. backgroundColor: '#FFCDD2',
    72. hoverState: {
    73. backgroundColor: '#EF9A9A'
    74. }
    75. },
    76. PA: {
    77. group: 1,
    78. backgroundColor: '#FFCDD2',
    79. hoverState: {
    80. backgroundColor: '#EF9A9A'
    81. }
    82. },
    83.  
    84. //Midwest:
    85. IL: {
    86. group: 2,
    87. backgroundColor: '#FFE0B2',
    88. hoverState: {
    89. backgroundColor: '#FFB74D'
    90. }
    91. },
    92. IN: {
    93. group: 2,
    94. backgroundColor: '#FFE0B2',
    95. hoverState: {
    96. backgroundColor: '#FFB74D'
    97. }
    98. },
    99. MI: {
    100. group: 2,
    101. backgroundColor: '#FFE0B2',
    102. hoverState: {
    103. backgroundColor: '#FFB74D'
    104. }
    105. },
    106. OH: {
    107. group: 2,
    108. backgroundColor: '#FFE0B2',
    109. hoverState: {
    110. backgroundColor: '#FFB74D'
    111. }
    112. },
    113. WI: {
    114. group: 2,
    115. backgroundColor: '#FFE0B2',
    116. hoverState: {
    117. backgroundColor: '#FFB74D'
    118. }
    119. },
    120. IA: {
    121. group: 2,
    122. backgroundColor: '#FFE0B2',
    123. hoverState: {
    124. backgroundColor: '#FFB74D'
    125. }
    126. },
    127. KS: {
    128. group: 2,
    129. backgroundColor: '#FFE0B2',
    130. hoverState: {
    131. backgroundColor: '#FFB74D'
    132. }
    133. },
    134. MN: {
    135. group: 2,
    136. backgroundColor: '#FFE0B2',
    137. hoverState: {
    138. backgroundColor: '#FFB74D'
    139. }
    140. },
    141. MO: {
    142. group: 2,
    143. backgroundColor: '#FFE0B2',
    144. hoverState: {
    145. backgroundColor: '#FFB74D'
    146. }
    147. },
    148. NE: {
    149. group: 2,
    150. backgroundColor: '#FFE0B2',
    151. hoverState: {
    152. backgroundColor: '#FFB74D'
    153. }
    154. },
    155. ND: {
    156. group: 2,
    157. backgroundColor: '#FFE0B2',
    158. hoverState: {
    159. backgroundColor: '#FFB74D'
    160. }
    161. },
    162. SD: {
    163. group: 2,
    164. backgroundColor: '#FFE0B2',
    165. hoverState: {
    166. backgroundColor: '#FFB74D'
    167. }
    168. },
    169.  
    170. //South:
    171. FL: {
    172. group: 3,
    173. backgroundColor: '#C8E6C9',
    174. hoverState: {
    175. backgroundColor: '#81C784'
    176. }
    177. },
    178. GA: {
    179. group: 3,
    180. backgroundColor: '#C8E6C9',
    181. hoverState: {
    182. backgroundColor: '#81C784'
    183. }
    184. },
    185. MD: {
    186. group: 3,
    187. backgroundColor: '#C8E6C9',
    188. hoverState: {
    189. backgroundColor: '#81C784'
    190. }
    191. },
    192. NC: {
    193. group: 3,
    194. backgroundColor: '#C8E6C9',
    195. hoverState: {
    196. backgroundColor: '#81C784'
    197. }
    198. },
    199. SC: {
    200. group: 3,
    201. backgroundColor: '#C8E6C9',
    202. hoverState: {
    203. backgroundColor: '#81C784'
    204. }
    205. },
    206. VA: {
    207. group: 3,
    208. backgroundColor: '#C8E6C9',
    209. hoverState: {
    210. backgroundColor: '#81C784'
    211. }
    212. },
    213. DC: {
    214. group: 3,
    215. backgroundColor: '#C8E6C9',
    216. hoverState: {
    217. backgroundColor: '#81C784'
    218. }
    219. },
    220. WV: {
    221. group: 3,
    222. backgroundColor: '#C8E6C9',
    223. hoverState: {
    224. backgroundColor: '#81C784'
    225. }
    226. },
    227. AL: {
    228. group: 3,
    229. backgroundColor: '#C8E6C9',
    230. hoverState: {
    231. backgroundColor: '#81C784'
    232. }
    233. },
    234. KY: {
    235. group: 3,
    236. backgroundColor: '#C8E6C9',
    237. hoverState: {
    238. backgroundColor: '#81C784'
    239. }
    240. },
    241. MS: {
    242. group: 3,
    243. backgroundColor: '#C8E6C9',
    244. hoverState: {
    245. backgroundColor: '#81C784'
    246. }
    247. },
    248. TN: {
    249. group: 3,
    250. backgroundColor: '#C8E6C9',
    251. hoverState: {
    252. backgroundColor: '#81C784'
    253. }
    254. },
    255. AR: {
    256. group: 3,
    257. backgroundColor: '#C8E6C9',
    258. hoverState: {
    259. backgroundColor: '#81C784'
    260. }
    261. },
    262. LA: {
    263. group: 3,
    264. backgroundColor: '#C8E6C9',
    265. hoverState: {
    266. backgroundColor: '#81C784'
    267. }
    268. },
    269. OK: {
    270. group: 3,
    271. backgroundColor: '#C8E6C9',
    272. hoverState: {
    273. backgroundColor: '#81C784'
    274. }
    275. },
    276. TX: {
    277. group: 3,
    278. backgroundColor: '#C8E6C9',
    279. hoverState: {
    280. backgroundColor: '#81C784'
    281. }
    282. },
    283.  
    284. //West:
    285. AZ: {
    286. group: 4,
    287. backgroundColor: '#BBDEFB',
    288. hoverState: {
    289. backgroundColor: '#64B5F6'
    290. }
    291. },
    292. CO: {
    293. group: 4,
    294. backgroundColor: '#BBDEFB',
    295. hoverState: {
    296. backgroundColor: '#64B5F6'
    297. }
    298. },
    299. ID: {
    300. group: 4,
    301. backgroundColor: '#BBDEFB',
    302. hoverState: {
    303. backgroundColor: '#64B5F6'
    304. }
    305. },
    306. MT: {
    307. group: 4,
    308. backgroundColor: '#BBDEFB',
    309. hoverState: {
    310. backgroundColor: '#64B5F6'
    311. }
    312. },
    313. NV: {
    314. group: 4,
    315. backgroundColor: '#BBDEFB',
    316. hoverState: {
    317. backgroundColor: '#64B5F6'
    318. }
    319. },
    320. NM: {
    321. group: 4,
    322. backgroundColor: '#BBDEFB',
    323. hoverState: {
    324. backgroundColor: '#64B5F6'
    325. }
    326. },
    327. UT: {
    328. group: 4,
    329. backgroundColor: '#BBDEFB',
    330. hoverState: {
    331. backgroundColor: '#64B5F6'
    332. }
    333. },
    334. WY: {
    335. group: 4,
    336. backgroundColor: '#BBDEFB',
    337. hoverState: {
    338. backgroundColor: '#64B5F6'
    339. }
    340. },
    341. AK: {
    342. group: 4,
    343. backgroundColor: '#BBDEFB',
    344. hoverState: {
    345. backgroundColor: '#64B5F6'
    346. }
    347. },
    348. CA: {
    349. group: 4,
    350. backgroundColor: '#BBDEFB',
    351. hoverState: {
    352. backgroundColor: '#64B5F6'
    353. }
    354. },
    355. HI: {
    356. group: 4,
    357. backgroundColor: '#BBDEFB',
    358. hoverState: {
    359. backgroundColor: '#64B5F6'
    360. }
    361. },
    362. OR: {
    363. group: 4,
    364. backgroundColor: '#BBDEFB',
    365. hoverState: {
    366. backgroundColor: '#64B5F6'
    367. }
    368. },
    369. WA: {
    370. group: 4,
    371. backgroundColor: '#BBDEFB',
    372. hoverState: {
    373. backgroundColor: '#64B5F6'
    374. }
    375. }
    376. },
    377. tooltip: {
    378. alpha: 0.5,
    379. backgroundColor: 'white',
    380. borderColor: 'white',
    381. borderRadius: 3,
    382. fontColor: 'black',
    383. fontFamily: 'Georgia',
    384. fontSize: 12,
    385. textAlpha: 1
    386. }
    387. }
    388. }
    389. }]
    390. },
    391. height: 400,
    392. width: '100%'
    393. });
    394. });