• 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. mediaRules: [{
    39. maxWidth: 400,
    40. color: 'red',
    41. }]
    42. }
    43. },
    44. zoomIn: {
    45. tooltip: {
    46. mediaRules: [{
    47. maxWidth: 400,
    48. color: 'blue',
    49. }]
    50. }
    51. }
    52. }
    53. }
    54. }
    55. }]
    56. };
    57.  
    58. zingchart.render({
    59. id: 'myChart',
    60. data: chartConfig,
    61. height: 400,
    62. width: '100%',
    63. });
    64.  
    65. });
    66. </script>
    67. </body>
    68.  
    69. </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. mediaRules: [{
    17. maxWidth: 400,
    18. color: 'red',
    19. }]
    20. }
    21. },
    22. zoomIn: {
    23. tooltip: {
    24. mediaRules: [{
    25. maxWidth: 400,
    26. color: 'blue',
    27. }]
    28. }
    29. }
    30. }
    31. }
    32. }
    33. }]
    34. };
    35.  
    36. zingchart.render({
    37. id: 'myChart',
    38. data: chartConfig,
    39. height: 400,
    40. width: '100%',
    41. });
    42.  
    43. });