map_json.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>amCharts Responsive Example</title>
  7. <link rel="stylesheet" href="http://www.amcharts.com/lib/3/ammap.css" type="text/css">
  8. <script src="http://www.amcharts.com/lib/3/ammap.js"></script>
  9. <script src="http://www.amcharts.com/lib/3/maps/js/usaLow.js"></script>
  10. <script src="../dataloader.min.js"></script>
  11. <style>
  12. body, html {
  13. font-family: Verdana;
  14. font-size: 12px;
  15. }
  16. #chartdiv {
  17. width: 100%;
  18. height: 500px;
  19. }
  20. </style>
  21. <script>
  22. var map = AmCharts.makeChart("chartdiv", {
  23. type: "map",
  24. "dataLoader": {
  25. "url": "data/map.json",
  26. "showErrors": false
  27. },
  28. "colorSteps": 10,
  29. "areasSettings": {
  30. "autoZoom": true
  31. },
  32. "smallMap": {},
  33. "valueLegend": {
  34. "right": 10,
  35. "minValue": "little",
  36. "maxValue": "a lot!"
  37. },
  38. "responsive": {
  39. "enabled": true
  40. }
  41. });
  42. </script>
  43. </head>
  44. <body>
  45. <div id="chartdiv"></div>
  46. </body>
  47. </html>