• 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>
    10. html,
    11. body {
    12. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    32. <script>
    33. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    34. var myConfig = {
    35. "graphset": [{
    36. "shapes": [{
    37. "type": "zingchart.maps",
    38. "options": {
    39. "name": "usa",
    40. "style": {
    41. "label": {
    42. "visible": false
    43. },
    44. "items": {
    45. "CA": {
    46. "background-color": "#9e9e9e"
    47. }
    48. }
    49. }
    50. }
    51. },
    52. {
    53. "type": "circle",
    54. "id": "sd", // id is OPTIONAL
    55. "x": "-117.1611lon", // hook shape based on lon/lat
    56. "y": "32.7157lat", // hook shape based on lon/lat
    57. "map": "usa", // assigning to map name or id is necessary
    58. "size": 15,
    59. "background-color": '#4dd0e1',
    60. "cursor": "pointer",
    61. "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy",
    62. "target": "_blank",
    63. "tooltip": {
    64. "backgroundColor": "#ff9800",
    65. "borderColor": "#333",
    66. "borderRadius": 4,
    67. "fontSize": 16,
    68. "text": "We're located right in San Diego!"
    69. }
    70. },
    71. {
    72. "type": "circle",
    73. "id": "hawaii",
    74.  
    75. "x": "-159.579lon",
    76. "y": "22.216lat",
    77.  
    78. "map": "usa",
    79. "item": "HI", // <----- this is needed
    80.  
    81. "size": 5,
    82. "background-color": "#4dd0e1",
    83. "cursor": "pointer",
    84. "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy",
    85. "target": "_blank",
    86. "tooltip": {
    87. "backgroundColor": "#ff9800",
    88. "borderColor": "#333",
    89. "borderRadius": 4,
    90. "fontSize": 16,
    91. "text": "We're located right in Hawaii!"
    92. }
    93. },
    94. {
    95. "type": "circle",
    96. "id": "alaska", // id is OPTIONAL
    97. "x": "-149.4937lon", // hook shape based on lon/lat
    98. "y": "64.2008lat", // hook shape based on lon/lat
    99. "map": "usa", // assigning to map name or id is necessary
    100. "item": "AK",
    101. "size": 15,
    102. "background-color": '#4dd0e1',
    103. "cursor": "pointer",
    104. "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy",
    105. "target": "_blank",
    106. "tooltip": {
    107. "backgroundColor": "#ff9800",
    108. "borderColor": "#333",
    109. "borderRadius": 4,
    110. "fontSize": 16,
    111. "text": "We're located right in Alaska!"
    112. }
    113. },
    114. ]
    115. }]
    116. };
    117.  
    118. zingchart.loadModules('maps, maps-usa', function() {
    119. zingchart.render({
    120. id: 'myChart',
    121. data: myConfig,
    122. height: '100%',
    123. width: '100%'
    124. });
    125. });
    126. </script>
    127. </body>
    128.  
    129. </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"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. var myConfig = {
    2. "graphset": [{
    3. "shapes": [{
    4. "type": "zingchart.maps",
    5. "options": {
    6. "name": "usa",
    7. "style": {
    8. "label": {
    9. "visible": false
    10. },
    11. "items": {
    12. "CA": {
    13. "background-color": "#9e9e9e"
    14. }
    15. }
    16. }
    17. }
    18. },
    19. {
    20. "type": "circle",
    21. "id": "sd", // id is OPTIONAL
    22. "x": "-117.1611lon", // hook shape based on lon/lat
    23. "y": "32.7157lat", // hook shape based on lon/lat
    24. "map": "usa", // assigning to map name or id is necessary
    25. "size": 15,
    26. "background-color": '#4dd0e1',
    27. "cursor": "pointer",
    28. "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy",
    29. "target": "_blank",
    30. "tooltip": {
    31. "backgroundColor": "#ff9800",
    32. "borderColor": "#333",
    33. "borderRadius": 4,
    34. "fontSize": 16,
    35. "text": "We're located right in San Diego!"
    36. }
    37. },
    38. {
    39. "type": "circle",
    40. "id": "hawaii",
    41.  
    42. "x": "-159.579lon",
    43. "y": "22.216lat",
    44.  
    45. "map": "usa",
    46. "item": "HI", // <----- this is needed
    47.  
    48. "size": 5,
    49. "background-color": "#4dd0e1",
    50. "cursor": "pointer",
    51. "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy",
    52. "target": "_blank",
    53. "tooltip": {
    54. "backgroundColor": "#ff9800",
    55. "borderColor": "#333",
    56. "borderRadius": 4,
    57. "fontSize": 16,
    58. "text": "We're located right in Hawaii!"
    59. }
    60. },
    61. {
    62. "type": "circle",
    63. "id": "alaska", // id is OPTIONAL
    64. "x": "-149.4937lon", // hook shape based on lon/lat
    65. "y": "64.2008lat", // hook shape based on lon/lat
    66. "map": "usa", // assigning to map name or id is necessary
    67. "item": "AK",
    68. "size": 15,
    69. "background-color": '#4dd0e1',
    70. "cursor": "pointer",
    71. "url": "https://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy",
    72. "target": "_blank",
    73. "tooltip": {
    74. "backgroundColor": "#ff9800",
    75. "borderColor": "#333",
    76. "borderRadius": 4,
    77. "fontSize": 16,
    78. "text": "We're located right in Alaska!"
    79. }
    80. },
    81. ]
    82. }]
    83. };
    84.  
    85. zingchart.loadModules('maps, maps-usa', function() {
    86. zingchart.render({
    87. id: 'myChart',
    88. data: myConfig,
    89. height: '100%',
    90. width: '100%'
    91. });
    92. });