• 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></style>
    11. </head>
    12.  
    13. <body>
    14. <div id='myChart'></div>
    15. <script>
    16. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    17. zingchart.loadModules('maps, maps-usa', function(e) {
    18. zingchart.render({
    19. id: 'myChart',
    20. data: {
    21. shapes: [{
    22. type: 'zingchart.maps',
    23. options: {
    24. name: 'usa',
    25.  
    26. zooming: false,
    27. panning: false,
    28. scrolling: false,
    29. style: {
    30. controls: {
    31. visible: false
    32. }
    33. }
    34. }
    35. }]
    36. },
    37. height: 400,
    38. width: '100%'
    39. });
    40. });
    41.  
    42. zingchart.shape_click = function(e) {
    43. console.log(arguments);
    44.  
    45. zingchart.exec(e.id, 'updateobject', {
    46. type: 'shape',
    47. data: {
    48. id: e.shapeid,
    49. backgroundColor: 'red',
    50. label: {
    51. fontColor: 'white'
    52. }
    53. }
    54. });
    55. };
    56. </script>
    57. </body>
    58.  
    59. </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. <div id='myChart'></div>
    14. </body>
    15.  
    16. </html>
    1.  
    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. zooming: false,
    11. panning: false,
    12. scrolling: false,
    13. style: {
    14. controls: {
    15. visible: false
    16. }
    17. }
    18. }
    19. }]
    20. },
    21. height: 400,
    22. width: '100%'
    23. });
    24. });
    25.  
    26. zingchart.shape_click = function(e) {
    27. console.log(arguments);
    28.  
    29. zingchart.exec(e.id, 'updateobject', {
    30. type: 'shape',
    31. data: {
    32. id: e.shapeid,
    33. backgroundColor: 'red',
    34. label: {
    35. fontColor: 'white'
    36. }
    37. }
    38. });
    39. };