• 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. #eventlog {
    12. background-color: black;
    13. color: white;
    14. height: 140px;
    15. padding: 1%;
    16. overflow: auto;
    17. width: 97%;
    18. }
    19.  
    20. pre {
    21. white-space: pre-wrap;
    22. }
    23. </style>
    24. </head>
    25.  
    26. <body>
    27. <button onClick="showLog();">getInfo()</button>
    28. <a href="#" onclick="clearlog();return false;">Clear Log</a>
    29. <pre id='eventlog'></pre>
    30. <br>
    31. <div id='myChart'></div>
    32. <script>
    33. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    34. zingchart.loadModules('maps, maps-usa', function(e) {
    35. zingchart.render({
    36. id: 'myChart',
    37. data: {
    38. shapes: [{
    39. type: 'zingchart.maps',
    40. options: {
    41. name: 'usa',
    42. }
    43. }]
    44. },
    45. height: 180,
    46. width: '100%'
    47. });
    48.  
    49.  
    50. });
    51.  
    52. window.clearlog = function clearlog() {
    53. document.getElementById('eventlog').innerText = '';
    54. };
    55.  
    56. window.showLog = function() {
    57. var myLog = document.getElementById('eventlog');
    58. myLog.innerText = JSON.stringify(zingchart.maps.getInfo('usa'), null, 2);
    59. };
    60. </script>
    61. </body>
    62.  
    63. </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 onClick="showLog();">getInfo()</button>
    14. <a href="#" onclick="clearlog();return false;">Clear Log</a>
    15. <pre id='eventlog'></pre>
    16. <br>
    17. <div id='myChart'></div>
    18. </body>
    19.  
    20. </html>
    1. #eventlog {
    2. background-color: black;
    3. color: white;
    4. height: 140px;
    5. padding: 1%;
    6. overflow: auto;
    7. width: 97%;
    8. }
    9.  
    10. pre {
    11. white-space: pre-wrap;
    12. }
    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: 180,
    13. width: '100%'
    14. });
    15.  
    16.  
    17. });
    18.  
    19. window.clearlog = function clearlog() {
    20. document.getElementById('eventlog').innerText = '';
    21. };
    22.  
    23. window.showLog = function() {
    24. var myLog = document.getElementById('eventlog');
    25. myLog.innerText = JSON.stringify(zingchart.maps.getInfo('usa'), null, 2);
    26. };