• 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. hoverState: {
    34. visible: false
    35. }
    36. }
    37. }
    38. }]
    39. },
    40. height: 400,
    41. width: '100%'
    42. });
    43. });
    44.  
    45. zingchart.shape_mouseover = function(e) {
    46. console.log(arguments);
    47.  
    48. zingchart.exec(e.id, 'updateobject', {
    49. type: 'shape',
    50. data: {
    51. id: e.shapeid,
    52. backgroundColor: 'red',
    53. label: {
    54. fontColor: 'white'
    55. }
    56. }
    57. });
    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. <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. hoverState: {
    18. visible: false
    19. }
    20. }
    21. }
    22. }]
    23. },
    24. height: 400,
    25. width: '100%'
    26. });
    27. });
    28.  
    29. zingchart.shape_mouseover = function(e) {
    30. console.log(arguments);
    31.  
    32. zingchart.exec(e.id, 'updateobject', {
    33. type: 'shape',
    34. data: {
    35. id: e.shapeid,
    36. backgroundColor: 'red',
    37. label: {
    38. fontColor: 'white'
    39. }
    40. }
    41. });
    42. };