• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body,
    12. #myChart {
    13. height: 100%;
    14. width: 100%;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='myChart'></div>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. zingchart.loadModules('maps, maps-usa_ak', function(e) {
    24.  
    25. let chartConfig = {
    26. shapes: [{
    27. type: 'zingchart.maps',
    28. options: {
    29. name: 'usa_ak',
    30. zooming: false,
    31. panning: false,
    32. scrolling: false,
    33. style: {
    34. controls: {
    35. placement: 'tr',
    36. zoomOut: {
    37. tooltip: {
    38. bottomState: {
    39. backgroundColor: 'red',
    40. offsetX: 10,
    41. offsetY: 10
    42. }
    43. }
    44. },
    45. zoomIn: {
    46. tooltip: {
    47. bottomState: {
    48. backgroundColor: 'blue',
    49. offsetX: 10,
    50. offsetY: 10
    51. }
    52. }
    53. }
    54. }
    55. }
    56. }
    57. }]
    58. };
    59.  
    60. zingchart.render({
    61. id: 'myChart',
    62. data: chartConfig,
    63. height: 400,
    64. width: '100%',
    65. });
    66.  
    67. });
    68. </script>
    69. </body>
    70.  
    71. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id='myChart'></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body,
    3. #myChart {
    4. height: 100%;
    5. width: 100%;
    6. }
    1. zingchart.loadModules('maps, maps-usa_ak', function(e) {
    2.  
    3. let chartConfig = {
    4. shapes: [{
    5. type: 'zingchart.maps',
    6. options: {
    7. name: 'usa_ak',
    8. zooming: false,
    9. panning: false,
    10. scrolling: false,
    11. style: {
    12. controls: {
    13. placement: 'tr',
    14. zoomOut: {
    15. tooltip: {
    16. bottomState: {
    17. backgroundColor: 'red',
    18. offsetX: 10,
    19. offsetY: 10
    20. }
    21. }
    22. },
    23. zoomIn: {
    24. tooltip: {
    25. bottomState: {
    26. backgroundColor: 'blue',
    27. offsetX: 10,
    28. offsetY: 10
    29. }
    30. }
    31. }
    32. }
    33. }
    34. }
    35. }]
    36. };
    37.  
    38. zingchart.render({
    39. id: 'myChart',
    40. data: chartConfig,
    41. height: 400,
    42. width: '100%',
    43. });
    44.  
    45. });