• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8.  
    9. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style>
    11. html,
    12. body {
    13. margin: 0;
    14. padding: 0;
    15. }
    16.  
    17. #myChart {
    18. height: 350px;
    19. width: 100%;
    20. }
    21.  
    22. pre {
    23. white-space: pre-wrap;
    24. }
    25. </style>
    26. </head>
    27.  
    28. <body>
    29. <button id='zoomIn'>zoomIn()</button>
    30. <a href='#' id='reset'>Reset</a>
    31. <br><br>
    32. <div id='myChart'></div>
    33.  
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    36. zingchart.loadModules('maps, maps-usa', function(e) {
    37. zingchart.render({
    38. id: 'myChart',
    39. data: {
    40. shapes: [{
    41. type: 'zingchart.maps',
    42. options: {
    43. name: 'usa',
    44. }
    45. }]
    46. },
    47. height: 350,
    48. width: '100%'
    49. });
    50. });
    51.  
    52. document.getElementById('zoomIn').addEventListener('click', function(e) {
    53. zingchart.maps.zoomIn('usa');
    54. });
    55.  
    56. document.getElementById('reset').addEventListener('click', function(e) {
    57. zingchart.maps.viewAll('usa');
    58. });
    59. </script>
    60. </body>
    61.  
    62. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8.  
    9. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <button id='zoomIn'>zoomIn()</button>
    14. <a href='#' id='reset'>Reset</a>
    15. <br><br>
    16. <div id='myChart'></div>
    17.  
    18. </body>
    19.  
    20. </html>
    1. html,
    2. body {
    3. margin: 0;
    4. padding: 0;
    5. }
    6.  
    7. #myChart {
    8. height: 350px;
    9. width: 100%;
    10. }
    11.  
    12. pre {
    13. white-space: pre-wrap;
    14. }
    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. }
    10. }]
    11. },
    12. height: 350,
    13. width: '100%'
    14. });
    15. });
    16.  
    17. document.getElementById('zoomIn').addEventListener('click', function(e) {
    18. zingchart.maps.zoomIn('usa');
    19. });
    20.  
    21. document.getElementById('reset').addEventListener('click', function(e) {
    22. zingchart.maps.viewAll('usa');
    23. });