• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <style>
    9. html,
    10. body {
    11. margin: 0;
    12. padding: 0;
    13. width: 100%;
    14. height: 100%;
    15. }
    16.  
    17. .chart--container {
    18. min-height: 150px;
    19. width: 100%;
    20. height: 100%;
    21. }
    22.  
    23. .zc-ref {
    24. display: none;
    25. }
    26. </style>
    27. </head>
    28.  
    29. <body>
    30. <!-- CHART CONTAINER -->
    31. <div id="myChart" class="chart--container">
    32. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    33. </div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    36. zingchart.MODULESDIR = 'https://cdn.zingchart.com/modules/';
    37. zingchart.loadModules('maps, maps-geojson', function(e) { //Required. Load the maps-geojson module.
    38. zingchart.maps.loadGeoJSON({ //Required. Add the loadGeoJSON() method.
    39. id: 'customMapName', //Required. Provide the id name, which will correspond to the name below.
    40. url: 'https://storage.googleapis.com/zingchart-com.appspot.com/maps/sd-boundaries.json', //Required. Provide the GeoJSON file source.
    41. //Source: https://github.com/blackmad/neighborhoods/blob/master/gn-san-diego.geojson?short_path=c5454cc
    42. mappings: { //Recommended. Allows you to property names from the GeoJSON file to ZingChart.
    43. id: 'name',
    44. name: 'name'
    45. },
    46. style: { //Optional.
    47.  
    48. },
    49. callback: function() { //Recommended. Use the function to render the map.
    50. zingchart.render({
    51. id: 'myChart',
    52. data: {
    53. shapes: [{
    54. type: 'zingchart.maps',
    55. options: {
    56. name: 'customMapName', //This corresponds with the id above.
    57.  
    58. style: {
    59. controls: {
    60. visible: false
    61. },
    62. label: {
    63. visible: false
    64. },
    65. items: {
    66. PACIFIC_BEACH: {
    67. backgroundColor: 'red',
    68. label: {
    69. visible: true
    70. }
    71. }
    72. }
    73. },
    74. zoom: false,
    75. zooming: false,
    76. panning: false,
    77. }
    78. }]
    79. },
    80. height: '100%',
    81. width: '100%'
    82. });
    83. }
    84. });
    85. });
    86. </script>
    87. </body>
    88.  
    89. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <!-- CHART CONTAINER -->
    12. <div id="myChart" class="chart--container">
    13. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    14. </div>
    15. </body>
    16.  
    17. </html>
    1. html,
    2. body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. min-height: 150px;
    11. width: 100%;
    12. height: 100%;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. zingchart.MODULESDIR = 'https://cdn.zingchart.com/modules/';
    2. zingchart.loadModules('maps, maps-geojson', function(e) { //Required. Load the maps-geojson module.
    3. zingchart.maps.loadGeoJSON({ //Required. Add the loadGeoJSON() method.
    4. id: 'customMapName', //Required. Provide the id name, which will correspond to the name below.
    5. url: 'https://storage.googleapis.com/zingchart-com.appspot.com/maps/sd-boundaries.json', //Required. Provide the GeoJSON file source.
    6. //Source: https://github.com/blackmad/neighborhoods/blob/master/gn-san-diego.geojson?short_path=c5454cc
    7. mappings: { //Recommended. Allows you to property names from the GeoJSON file to ZingChart.
    8. id: 'name',
    9. name: 'name'
    10. },
    11. style: { //Optional.
    12.  
    13. },
    14. callback: function() { //Recommended. Use the function to render the map.
    15. zingchart.render({
    16. id: 'myChart',
    17. data: {
    18. shapes: [{
    19. type: 'zingchart.maps',
    20. options: {
    21. name: 'customMapName', //This corresponds with the id above.
    22.  
    23. style: {
    24. controls: {
    25. visible: false
    26. },
    27. label: {
    28. visible: false
    29. },
    30. items: {
    31. PACIFIC_BEACH: {
    32. backgroundColor: 'red',
    33. label: {
    34. visible: true
    35. }
    36. }
    37. }
    38. },
    39. zoom: false,
    40. zooming: false,
    41. panning: false,
    42. }
    43. }]
    44. },
    45. height: '100%',
    46. width: '100%'
    47. });
    48. }
    49. });
    50. });