• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <!--
    9. Point ZingChart to modules folder so ZingChart
    10. can automatically grab the CSV module
    11. -->
    12. <script nonce="undefined">
    13. zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
    14. </script>
    15. <style>
    16. html,
    17. body {
    18. margin: 0;
    19. padding: 0;
    20. width: 100%;
    21. height: 100%;
    22. }
    23.  
    24. .chart--container {
    25. min-height: 150px;
    26. overflow: auto;
    27. position: relative;
    28. width: 100%;
    29. height: 100%;
    30. }
    31.  
    32. #myChart {
    33. width: 100%;
    34. height: 100%;
    35. }
    36.  
    37. .zc-ref {
    38. display: none;
    39. }
    40. </style>
    41. </head>
    42.  
    43. <body>
    44. <!-- CHART CONTAINER -->
    45. <div id="myChart" class="chart--container">
    46. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    47. </div>
    48. <script>
    49. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load event for Javascript to run after HTML
    50. // because this Javascript is injected into the document head
    51. window.addEventListener('load', () => {
    52. // Javascript code to execute after DOM content
    53.  
    54. // full ZingChart schema can be found here:
    55. // https://www.zingchart.com/docs/api/json-configuration/
    56. let chartData = [{
    57. id: 'theworld',
    58. parent: '',
    59. name: 'The World',
    60. group: ''
    61. },
    62. {
    63. id: 'russia',
    64. parent: 'theworld',
    65. name: 'Russia',
    66. value: 143989754,
    67. group: 'europe'
    68. },
    69. {
    70. id: 'ukraine',
    71. parent: 'theworld',
    72. name: 'Ukraine',
    73. value: 44222947,
    74. group: 'europe'
    75. },
    76. {
    77. id: 'poland',
    78. parent: 'theworld',
    79. name: 'Poland',
    80. value: 38170712,
    81. group: 'europe'
    82. },
    83. {
    84. id: 'romania',
    85. parent: 'theworld',
    86. name: 'Romania',
    87. value: 19679306,
    88. group: 'europe'
    89. },
    90. {
    91. id: 'czechia',
    92. parent: 'theworld',
    93. name: 'Czechia',
    94. value: 10618303,
    95. group: 'europe'
    96. },
    97. {
    98. id: 'hungary',
    99. parent: 'theworld',
    100. name: 'Hungary',
    101. value: 9721559,
    102. group: 'europe'
    103. },
    104. {
    105. id: 'belarus',
    106. parent: 'theworld',
    107. name: 'Belarus',
    108. value: 9468338,
    109. group: 'europe'
    110. },
    111. {
    112. id: 'bulgaria',
    113. parent: 'theworld',
    114. name: 'Bulgaria',
    115. value: 7084571,
    116. group: 'europe'
    117. },
    118. {
    119. id: 'slovakia',
    120. parent: 'theworld',
    121. name: 'Slovakia',
    122. value: 5447662,
    123. group: 'europe'
    124. },
    125. {
    126. id: 'moldova',
    127. parent: 'theworld',
    128. name: 'Moldova',
    129. value: 4051212,
    130. group: 'europe'
    131. },
    132. {
    133. id: 'unitedkingdom',
    134. parent: 'theworld',
    135. name: 'United Kingdom',
    136. value: 66181585,
    137. group: 'europe'
    138. },
    139. {
    140. id: 'sweden',
    141. parent: 'theworld',
    142. name: 'Sweden',
    143. value: 9910701,
    144. group: 'europe'
    145. },
    146. {
    147. id: 'denmark',
    148. parent: 'theworld',
    149. name: 'Denmark',
    150. value: 5733551,
    151. group: 'europe'
    152. },
    153. {
    154. id: 'finland',
    155. parent: 'theworld',
    156. name: 'Finland',
    157. value: 5523231,
    158. group: 'europe'
    159. },
    160. {
    161. id: 'norway',
    162. parent: 'theworld',
    163. name: 'Norway',
    164. value: 5305383,
    165. group: 'europe'
    166. },
    167. {
    168. id: 'ireland',
    169. parent: 'theworld',
    170. name: 'Ireland',
    171. value: 4761657,
    172. group: 'europe'
    173. },
    174. {
    175. id: 'lithuania',
    176. parent: 'theworld',
    177. name: 'Lithuania',
    178. value: 2890297,
    179. group: 'europe'
    180. },
    181. {
    182. id: 'latvia',
    183. parent: 'theworld',
    184. name: 'Latvia',
    185. value: 1949670,
    186. group: 'europe'
    187. },
    188. {
    189. id: 'estonia',
    190. parent: 'theworld',
    191. name: 'Estonia',
    192. value: 1309632,
    193. group: 'europe'
    194. },
    195. {
    196. id: 'iceland',
    197. parent: 'theworld',
    198. name: 'Iceland',
    199. value: 335025,
    200. group: 'europe'
    201. },
    202. {
    203. id: 'guernseyandjersey',
    204. parent: 'theworld',
    205. name: 'Guernsey and Jersey',
    206. value: 165314,
    207. group: 'europe'
    208. },
    209. {
    210. id: 'isleofman',
    211. parent: 'theworld',
    212. name: 'Isle of Man',
    213. value: 84287,
    214. group: 'europe'
    215. },
    216. {
    217. id: 'faroeislands',
    218. parent: 'theworld',
    219. name: 'Faroe Islands',
    220. value: 49290,
    221. group: 'europe'
    222. },
    223. {
    224. id: 'italy',
    225. parent: 'theworld',
    226. name: 'Italy',
    227. value: 59359900,
    228. group: 'europe'
    229. },
    230. {
    231. id: 'spain',
    232. parent: 'theworld',
    233. name: 'Spain',
    234. value: 46354321,
    235. group: 'europe'
    236. },
    237. {
    238. id: 'greece',
    239. parent: 'theworld',
    240. name: 'Greece',
    241. value: 11159773,
    242. group: 'europe'
    243. },
    244. {
    245. id: 'cyprus',
    246. parent: 'theworld',
    247. name: 'Cyprus',
    248. value: 1179551,
    249. group: 'europe'
    250. },
    251. {
    252. id: 'portugal',
    253. parent: 'theworld',
    254. name: 'Portugal',
    255. value: 10329506,
    256. group: 'europe'
    257. },
    258. {
    259. id: 'serbia',
    260. parent: 'theworld',
    261. name: 'Serbia',
    262. value: 8790574,
    263. group: 'europe'
    264. },
    265. {
    266. id: 'croatia',
    267. parent: 'theworld',
    268. name: 'Croatia',
    269. value: 4189353,
    270. group: 'europe'
    271. },
    272. {
    273. id: 'bosniaandherzegovina',
    274. parent: 'theworld',
    275. name: 'Bosnia and Herzegovina',
    276. value: 3507017,
    277. group: 'europe'
    278. },
    279. {
    280. id: 'albania',
    281. parent: 'theworld',
    282. name: 'Albania',
    283. value: 2930187,
    284. group: 'europe'
    285. },
    286. {
    287. id: 'republicofmacedonia',
    288. parent: 'theworld',
    289. name: 'Republic of Macedonia',
    290. value: 2083160,
    291. group: 'europe'
    292. },
    293. {
    294. id: 'slovenia',
    295. parent: 'theworld',
    296. name: 'Slovenia',
    297. value: 2079976,
    298. group: 'europe'
    299. },
    300. {
    301. id: 'montenegro',
    302. parent: 'theworld',
    303. name: 'Montenegro',
    304. value: 628960,
    305. group: 'europe'
    306. },
    307. {
    308. id: 'malta',
    309. parent: 'theworld',
    310. name: 'Malta',
    311. value: 430835,
    312. group: 'europe'
    313. },
    314. {
    315. id: 'andorra',
    316. parent: 'theworld',
    317. name: 'Andorra',
    318. value: 76965,
    319. group: 'europe'
    320. },
    321. {
    322. id: 'gibraltar',
    323. parent: 'theworld',
    324. name: 'Gibraltar',
    325. value: 34571,
    326. group: 'europe'
    327. },
    328. {
    329. id: 'sanmarino',
    330. parent: 'theworld',
    331. name: 'San Marino',
    332. value: 33400,
    333. group: 'europe'
    334. },
    335. {
    336. id: 'vaticancity',
    337. parent: 'theworld',
    338. name: 'Vatican City',
    339. value: 792,
    340. group: 'europe'
    341. },
    342. {
    343. id: 'germany',
    344. parent: 'theworld',
    345. name: 'Germany',
    346. value: 82114224,
    347. group: 'europe'
    348. },
    349. {
    350. id: 'france',
    351. parent: 'theworld',
    352. name: 'France',
    353. value: 64979548,
    354. group: 'europe'
    355. },
    356. {
    357. id: 'netherlands',
    358. parent: 'theworld',
    359. name: 'Netherlands',
    360. value: 17035938,
    361. group: 'europe'
    362. },
    363. {
    364. id: 'belgium',
    365. parent: 'theworld',
    366. name: 'Belgium',
    367. value: 11429336,
    368. group: 'europe'
    369. },
    370. {
    371. id: 'austria',
    372. parent: 'theworld',
    373. name: 'Austria',
    374. value: 8735453,
    375. group: 'europe'
    376. },
    377. {
    378. id: 'switzerland',
    379. parent: 'theworld',
    380. name: 'Switzerland',
    381. value: 8476005,
    382. group: 'europe'
    383. },
    384. {
    385. id: 'luxembourg',
    386. parent: 'theworld',
    387. name: 'Luxembourg',
    388. value: 583455,
    389. group: 'europe'
    390. },
    391. {
    392. id: 'monaco',
    393. parent: 'theworld',
    394. name: 'Monaco',
    395. value: 38695,
    396. group: 'europe'
    397. },
    398. {
    399. id: 'liechtenstein',
    400. parent: 'theworld',
    401. name: 'Liechtenstein',
    402. value: 37922,
    403. group: 'europe'
    404. },
    405. {
    406. id: 'brazil',
    407. parent: 'theworld',
    408. name: 'Brazil',
    409. value: 209288278.71,
    410. group: 'southamerica'
    411. },
    412. {
    413. id: 'colombia',
    414. parent: 'theworld',
    415. name: 'Colombia',
    416. value: 49065615,
    417. group: 'southamerica'
    418. },
    419. {
    420. id: 'argentina',
    421. parent: 'theworld',
    422. name: 'Argentina',
    423. value: 44271041,
    424. group: 'southamerica'
    425. },
    426. {
    427. id: 'peru',
    428. parent: 'theworld',
    429. name: 'Peru',
    430. value: 32165485,
    431. group: 'southamerica'
    432. },
    433. {
    434. id: 'venezuela',
    435. parent: 'theworld',
    436. name: 'Venezuela',
    437. value: 31977065,
    438. group: 'southamerica'
    439. },
    440. {
    441. id: 'chile',
    442. parent: 'theworld',
    443. name: 'Chile',
    444. value: 18054726,
    445. group: 'southamerica'
    446. },
    447. {
    448. id: 'ecuador',
    449. parent: 'theworld',
    450. name: 'Ecuador',
    451. value: 16624858,
    452. group: 'southamerica'
    453. },
    454. {
    455. id: 'bolivia',
    456. parent: 'theworld',
    457. name: 'Bolivia',
    458. value: 11051600,
    459. group: 'southamerica'
    460. },
    461. {
    462. id: 'paraguay',
    463. parent: 'theworld',
    464. name: 'Paraguay',
    465. value: 6811297,
    466. group: 'southamerica'
    467. },
    468. {
    469. id: 'uruguay',
    470. parent: 'theworld',
    471. name: 'Uruguay',
    472. value: 3456750,
    473. group: 'southamerica'
    474. },
    475. {
    476. id: 'guyana',
    477. parent: 'theworld',
    478. name: 'Guyana',
    479. value: 777859,
    480. group: 'southamerica'
    481. },
    482. {
    483. id: 'suriname',
    484. parent: 'theworld',
    485. name: 'Suriname',
    486. value: 563402,
    487. group: 'southamerica'
    488. },
    489. {
    490. id: 'frenchguiana',
    491. parent: 'theworld',
    492. name: 'French Guiana',
    493. value: 282731,
    494. group: 'southamerica'
    495. },
    496. {
    497. id: 'falklandislands',
    498. parent: 'theworld',
    499. name: 'Falkland Islands',
    500. value: 2910,
    501. group: 'southamerica'
    502. },
    503. ];
    504.  
    505. let chartConfig = {
    506. type: 'bubble-pack',
    507. plotarea: {
    508. margin: 10
    509. },
    510. options: {
    511. item: {
    512. label: {
    513. text: '%value',
    514. // %value, %fullvalue, %name, %fullname
    515. },
    516. tooltip: {
    517. backgroundColor: 'yellow',
    518.  
    519. mediaRules: [{
    520. maxWidth: 400,
    521. backgroundColor: 'orange',
    522. }],
    523. },
    524. },
    525. // we need to hide the label for "The World"
    526. 'item-level-0': {
    527. label: {
    528. text: ' '
    529. }
    530. },
    531. 'item-level-1': {
    532. backgroundColor: 'green'
    533. },
    534. palette: ['#ff5252', '#448aff', '#ffab40'],
    535. padding: 2,
    536. minSize: 3,
    537. groupFilter: ['southamerica', 'europe'],
    538. format: {
    539. short: true,
    540. decimals: 1,
    541. decimalsSeparator: '.',
    542. thousandsSeparator: ','
    543. }
    544. },
    545. series: chartData
    546. };
    547.  
    548. zingchart.loadModules('bubble-pack', function() {
    549. zingchart.render({
    550. id: 'myChart',
    551. data: chartConfig,
    552. height: '100%',
    553. width: '100%',
    554. });
    555. });
    556. });
    557. </script>
    558. </body>
    559.  
    560. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <!--
    9. Point ZingChart to modules folder so ZingChart
    10. can automatically grab the CSV module
    11. -->
    12. <script>
    13. zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
    14. </script>
    15. </head>
    16.  
    17. <body>
    18. <!-- CHART CONTAINER -->
    19. <div id="myChart" class="chart--container">
    20. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    21. </div>
    22. </body>
    23.  
    24. </html>
    1. html,
    2. body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. min-height: 150px;
    11. overflow: auto;
    12. position: relative;
    13. width: 100%;
    14. height: 100%;
    15. }
    16.  
    17. #myChart {
    18. width: 100%;
    19. height: 100%;
    20. }
    21.  
    22. .zc-ref {
    23. display: none;
    24. }
    1. // window:load event for Javascript to run after HTML
    2. // because this Javascript is injected into the document head
    3. window.addEventListener('load', () => {
    4. // Javascript code to execute after DOM content
    5.  
    6. // full ZingChart schema can be found here:
    7. // https://www.zingchart.com/docs/api/json-configuration/
    8. let chartData = [{
    9. id: 'theworld',
    10. parent: '',
    11. name: 'The World',
    12. group: ''
    13. },
    14. {
    15. id: 'russia',
    16. parent: 'theworld',
    17. name: 'Russia',
    18. value: 143989754,
    19. group: 'europe'
    20. },
    21. {
    22. id: 'ukraine',
    23. parent: 'theworld',
    24. name: 'Ukraine',
    25. value: 44222947,
    26. group: 'europe'
    27. },
    28. {
    29. id: 'poland',
    30. parent: 'theworld',
    31. name: 'Poland',
    32. value: 38170712,
    33. group: 'europe'
    34. },
    35. {
    36. id: 'romania',
    37. parent: 'theworld',
    38. name: 'Romania',
    39. value: 19679306,
    40. group: 'europe'
    41. },
    42. {
    43. id: 'czechia',
    44. parent: 'theworld',
    45. name: 'Czechia',
    46. value: 10618303,
    47. group: 'europe'
    48. },
    49. {
    50. id: 'hungary',
    51. parent: 'theworld',
    52. name: 'Hungary',
    53. value: 9721559,
    54. group: 'europe'
    55. },
    56. {
    57. id: 'belarus',
    58. parent: 'theworld',
    59. name: 'Belarus',
    60. value: 9468338,
    61. group: 'europe'
    62. },
    63. {
    64. id: 'bulgaria',
    65. parent: 'theworld',
    66. name: 'Bulgaria',
    67. value: 7084571,
    68. group: 'europe'
    69. },
    70. {
    71. id: 'slovakia',
    72. parent: 'theworld',
    73. name: 'Slovakia',
    74. value: 5447662,
    75. group: 'europe'
    76. },
    77. {
    78. id: 'moldova',
    79. parent: 'theworld',
    80. name: 'Moldova',
    81. value: 4051212,
    82. group: 'europe'
    83. },
    84. {
    85. id: 'unitedkingdom',
    86. parent: 'theworld',
    87. name: 'United Kingdom',
    88. value: 66181585,
    89. group: 'europe'
    90. },
    91. {
    92. id: 'sweden',
    93. parent: 'theworld',
    94. name: 'Sweden',
    95. value: 9910701,
    96. group: 'europe'
    97. },
    98. {
    99. id: 'denmark',
    100. parent: 'theworld',
    101. name: 'Denmark',
    102. value: 5733551,
    103. group: 'europe'
    104. },
    105. {
    106. id: 'finland',
    107. parent: 'theworld',
    108. name: 'Finland',
    109. value: 5523231,
    110. group: 'europe'
    111. },
    112. {
    113. id: 'norway',
    114. parent: 'theworld',
    115. name: 'Norway',
    116. value: 5305383,
    117. group: 'europe'
    118. },
    119. {
    120. id: 'ireland',
    121. parent: 'theworld',
    122. name: 'Ireland',
    123. value: 4761657,
    124. group: 'europe'
    125. },
    126. {
    127. id: 'lithuania',
    128. parent: 'theworld',
    129. name: 'Lithuania',
    130. value: 2890297,
    131. group: 'europe'
    132. },
    133. {
    134. id: 'latvia',
    135. parent: 'theworld',
    136. name: 'Latvia',
    137. value: 1949670,
    138. group: 'europe'
    139. },
    140. {
    141. id: 'estonia',
    142. parent: 'theworld',
    143. name: 'Estonia',
    144. value: 1309632,
    145. group: 'europe'
    146. },
    147. {
    148. id: 'iceland',
    149. parent: 'theworld',
    150. name: 'Iceland',
    151. value: 335025,
    152. group: 'europe'
    153. },
    154. {
    155. id: 'guernseyandjersey',
    156. parent: 'theworld',
    157. name: 'Guernsey and Jersey',
    158. value: 165314,
    159. group: 'europe'
    160. },
    161. {
    162. id: 'isleofman',
    163. parent: 'theworld',
    164. name: 'Isle of Man',
    165. value: 84287,
    166. group: 'europe'
    167. },
    168. {
    169. id: 'faroeislands',
    170. parent: 'theworld',
    171. name: 'Faroe Islands',
    172. value: 49290,
    173. group: 'europe'
    174. },
    175. {
    176. id: 'italy',
    177. parent: 'theworld',
    178. name: 'Italy',
    179. value: 59359900,
    180. group: 'europe'
    181. },
    182. {
    183. id: 'spain',
    184. parent: 'theworld',
    185. name: 'Spain',
    186. value: 46354321,
    187. group: 'europe'
    188. },
    189. {
    190. id: 'greece',
    191. parent: 'theworld',
    192. name: 'Greece',
    193. value: 11159773,
    194. group: 'europe'
    195. },
    196. {
    197. id: 'cyprus',
    198. parent: 'theworld',
    199. name: 'Cyprus',
    200. value: 1179551,
    201. group: 'europe'
    202. },
    203. {
    204. id: 'portugal',
    205. parent: 'theworld',
    206. name: 'Portugal',
    207. value: 10329506,
    208. group: 'europe'
    209. },
    210. {
    211. id: 'serbia',
    212. parent: 'theworld',
    213. name: 'Serbia',
    214. value: 8790574,
    215. group: 'europe'
    216. },
    217. {
    218. id: 'croatia',
    219. parent: 'theworld',
    220. name: 'Croatia',
    221. value: 4189353,
    222. group: 'europe'
    223. },
    224. {
    225. id: 'bosniaandherzegovina',
    226. parent: 'theworld',
    227. name: 'Bosnia and Herzegovina',
    228. value: 3507017,
    229. group: 'europe'
    230. },
    231. {
    232. id: 'albania',
    233. parent: 'theworld',
    234. name: 'Albania',
    235. value: 2930187,
    236. group: 'europe'
    237. },
    238. {
    239. id: 'republicofmacedonia',
    240. parent: 'theworld',
    241. name: 'Republic of Macedonia',
    242. value: 2083160,
    243. group: 'europe'
    244. },
    245. {
    246. id: 'slovenia',
    247. parent: 'theworld',
    248. name: 'Slovenia',
    249. value: 2079976,
    250. group: 'europe'
    251. },
    252. {
    253. id: 'montenegro',
    254. parent: 'theworld',
    255. name: 'Montenegro',
    256. value: 628960,
    257. group: 'europe'
    258. },
    259. {
    260. id: 'malta',
    261. parent: 'theworld',
    262. name: 'Malta',
    263. value: 430835,
    264. group: 'europe'
    265. },
    266. {
    267. id: 'andorra',
    268. parent: 'theworld',
    269. name: 'Andorra',
    270. value: 76965,
    271. group: 'europe'
    272. },
    273. {
    274. id: 'gibraltar',
    275. parent: 'theworld',
    276. name: 'Gibraltar',
    277. value: 34571,
    278. group: 'europe'
    279. },
    280. {
    281. id: 'sanmarino',
    282. parent: 'theworld',
    283. name: 'San Marino',
    284. value: 33400,
    285. group: 'europe'
    286. },
    287. {
    288. id: 'vaticancity',
    289. parent: 'theworld',
    290. name: 'Vatican City',
    291. value: 792,
    292. group: 'europe'
    293. },
    294. {
    295. id: 'germany',
    296. parent: 'theworld',
    297. name: 'Germany',
    298. value: 82114224,
    299. group: 'europe'
    300. },
    301. {
    302. id: 'france',
    303. parent: 'theworld',
    304. name: 'France',
    305. value: 64979548,
    306. group: 'europe'
    307. },
    308. {
    309. id: 'netherlands',
    310. parent: 'theworld',
    311. name: 'Netherlands',
    312. value: 17035938,
    313. group: 'europe'
    314. },
    315. {
    316. id: 'belgium',
    317. parent: 'theworld',
    318. name: 'Belgium',
    319. value: 11429336,
    320. group: 'europe'
    321. },
    322. {
    323. id: 'austria',
    324. parent: 'theworld',
    325. name: 'Austria',
    326. value: 8735453,
    327. group: 'europe'
    328. },
    329. {
    330. id: 'switzerland',
    331. parent: 'theworld',
    332. name: 'Switzerland',
    333. value: 8476005,
    334. group: 'europe'
    335. },
    336. {
    337. id: 'luxembourg',
    338. parent: 'theworld',
    339. name: 'Luxembourg',
    340. value: 583455,
    341. group: 'europe'
    342. },
    343. {
    344. id: 'monaco',
    345. parent: 'theworld',
    346. name: 'Monaco',
    347. value: 38695,
    348. group: 'europe'
    349. },
    350. {
    351. id: 'liechtenstein',
    352. parent: 'theworld',
    353. name: 'Liechtenstein',
    354. value: 37922,
    355. group: 'europe'
    356. },
    357. {
    358. id: 'brazil',
    359. parent: 'theworld',
    360. name: 'Brazil',
    361. value: 209288278.71,
    362. group: 'southamerica'
    363. },
    364. {
    365. id: 'colombia',
    366. parent: 'theworld',
    367. name: 'Colombia',
    368. value: 49065615,
    369. group: 'southamerica'
    370. },
    371. {
    372. id: 'argentina',
    373. parent: 'theworld',
    374. name: 'Argentina',
    375. value: 44271041,
    376. group: 'southamerica'
    377. },
    378. {
    379. id: 'peru',
    380. parent: 'theworld',
    381. name: 'Peru',
    382. value: 32165485,
    383. group: 'southamerica'
    384. },
    385. {
    386. id: 'venezuela',
    387. parent: 'theworld',
    388. name: 'Venezuela',
    389. value: 31977065,
    390. group: 'southamerica'
    391. },
    392. {
    393. id: 'chile',
    394. parent: 'theworld',
    395. name: 'Chile',
    396. value: 18054726,
    397. group: 'southamerica'
    398. },
    399. {
    400. id: 'ecuador',
    401. parent: 'theworld',
    402. name: 'Ecuador',
    403. value: 16624858,
    404. group: 'southamerica'
    405. },
    406. {
    407. id: 'bolivia',
    408. parent: 'theworld',
    409. name: 'Bolivia',
    410. value: 11051600,
    411. group: 'southamerica'
    412. },
    413. {
    414. id: 'paraguay',
    415. parent: 'theworld',
    416. name: 'Paraguay',
    417. value: 6811297,
    418. group: 'southamerica'
    419. },
    420. {
    421. id: 'uruguay',
    422. parent: 'theworld',
    423. name: 'Uruguay',
    424. value: 3456750,
    425. group: 'southamerica'
    426. },
    427. {
    428. id: 'guyana',
    429. parent: 'theworld',
    430. name: 'Guyana',
    431. value: 777859,
    432. group: 'southamerica'
    433. },
    434. {
    435. id: 'suriname',
    436. parent: 'theworld',
    437. name: 'Suriname',
    438. value: 563402,
    439. group: 'southamerica'
    440. },
    441. {
    442. id: 'frenchguiana',
    443. parent: 'theworld',
    444. name: 'French Guiana',
    445. value: 282731,
    446. group: 'southamerica'
    447. },
    448. {
    449. id: 'falklandislands',
    450. parent: 'theworld',
    451. name: 'Falkland Islands',
    452. value: 2910,
    453. group: 'southamerica'
    454. },
    455. ];
    456.  
    457. let chartConfig = {
    458. type: 'bubble-pack',
    459. plotarea: {
    460. margin: 10
    461. },
    462. options: {
    463. item: {
    464. label: {
    465. text: '%value',
    466. // %value, %fullvalue, %name, %fullname
    467. },
    468. tooltip: {
    469. backgroundColor: 'yellow',
    470.  
    471. mediaRules: [{
    472. maxWidth: 400,
    473. backgroundColor: 'orange',
    474. }],
    475. },
    476. },
    477. // we need to hide the label for "The World"
    478. 'item-level-0': {
    479. label: {
    480. text: ' '
    481. }
    482. },
    483. 'item-level-1': {
    484. backgroundColor: 'green'
    485. },
    486. palette: ['#ff5252', '#448aff', '#ffab40'],
    487. padding: 2,
    488. minSize: 3,
    489. groupFilter: ['southamerica', 'europe'],
    490. format: {
    491. short: true,
    492. decimals: 1,
    493. decimalsSeparator: '.',
    494. thousandsSeparator: ','
    495. }
    496. },
    497. series: chartData
    498. };
    499.  
    500. zingchart.loadModules('bubble-pack', function() {
    501. zingchart.render({
    502. id: 'myChart',
    503. data: chartConfig,
    504. height: '100%',
    505. width: '100%',
    506. });
    507. });
    508. });