• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html class="zc-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. <script nonce="undefined" src="https://cdn.zingchart.com/modules/zingchart-maps.min.js"></script>
    9. <script nonce="undefined" src="https://app.zingsoft.com/api/file/ZVRJJUA5/icMHmg5T6CrifOcwV2Z7_zingchart.maps.mlt.js"></script>
    10. <style>
    11. .zc-html,
    12. .zc-body {
    13. margin: 0;
    14. padding: 0;
    15. width: 100%;
    16. height: 100%;
    17. }
    18.  
    19. .chart--container {
    20. height: 100%;
    21. width: 100%;
    22. min-height: 530px;
    23. }
    24.  
    25. .zc-ref {
    26. display: none;
    27. }
    28. </style>
    29. </head>
    30.  
    31. <body class="zc-body">
    32. <!-- CHART CONTAINER -->
    33. <div id="myChart" class="chart--container">
    34. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    35. </div>
    36. <script>
    37. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load event for Javascript to run after HTML
    38. // because this Javascript is injected into the document head
    39. window.addEventListener('load', () => {
    40. // Javascript code to execute after DOM content
    41.  
    42. // full ZingChart schema can be found here:
    43. // https://www.zingchart.com/docs/api/json-configuration/
    44. let chartConfig = {
    45. shapes: [{
    46. type: 'zingchart.maps',
    47. options: {
    48. name: 'mlt',
    49. // map item styling
    50. style: {
    51. // tooltip styling
    52. tooltip: {
    53. backgroundColor: '#424242',
    54. callout: true,
    55. fontColor: '#fff'
    56. },
    57. backgroundColor: '#bdbdbd',
    58. hoverState: {
    59. backgroundColor: '#ff5252'
    60. },
    61. // style individual map items
    62. items: {
    63. // map items are
    64. AT: {
    65. backgroundColor: '#ff9100',
    66. hoverState: {
    67. backgroundColor: '#ffb74d'
    68. }
    69. }
    70. }
    71. }
    72. }
    73. }]
    74. };
    75.  
    76. // renders chart
    77. zingchart.render({
    78. id: 'myChart',
    79. data: chartConfig,
    80. height: '100%',
    81. width: '100%',
    82. });
    83.  
    84. zingchart.bind('myChart', 'maps.zoom', function(p) {
    85. console.log(p);
    86. })
    87.  
    88. });
    89. </script>
    90. </body>
    91.  
    92. </html>
    1. <!DOCTYPE html>
    2. <html class="zc-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. <script src="https://cdn.zingchart.com/modules/zingchart-maps.min.js"></script>
    9. <script src="https://app.zingsoft.com/api/file/ZVRJJUA5/icMHmg5T6CrifOcwV2Z7_zingchart.maps.mlt.js"></script>
    10. </head>
    11.  
    12. <body class="zc-body">
    13. <!-- CHART CONTAINER -->
    14. <div id="myChart" class="chart--container">
    15. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    16. </div>
    17. </body>
    18.  
    19. </html>
    1. .zc-html,
    2. .zc-body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 530px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    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 chartConfig = {
    9. shapes: [{
    10. type: 'zingchart.maps',
    11. options: {
    12. name: 'mlt',
    13. // map item styling
    14. style: {
    15. // tooltip styling
    16. tooltip: {
    17. backgroundColor: '#424242',
    18. callout: true,
    19. fontColor: '#fff'
    20. },
    21. backgroundColor: '#bdbdbd',
    22. hoverState: {
    23. backgroundColor: '#ff5252'
    24. },
    25. // style individual map items
    26. items: {
    27. // map items are
    28. AT: {
    29. backgroundColor: '#ff9100',
    30. hoverState: {
    31. backgroundColor: '#ffb74d'
    32. }
    33. }
    34. }
    35. }
    36. }
    37. }]
    38. };
    39.  
    40. // renders chart
    41. zingchart.render({
    42. id: 'myChart',
    43. data: chartConfig,
    44. height: '100%',
    45. width: '100%',
    46. });
    47.  
    48. zingchart.bind('myChart', 'maps.zoom', function(p) {
    49. console.log(p);
    50. })
    51.  
    52. });