You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. <title>amCharts examples</title>
  6. <link rel="stylesheet" href="style.css" type="text/css">
  7. <script src="../amcharts/amcharts.js" type="text/javascript"></script>
  8. <script src="../amcharts/funnel.js" type="text/javascript"></script>
  9. <script>
  10. var chart;
  11. var data = [
  12. {
  13. "title": "Website visits",
  14. "value": 300
  15. },
  16. {
  17. "title": "Downloads",
  18. "value": 123
  19. },
  20. {
  21. "title": "Requested price list",
  22. "value": 98
  23. },
  24. {
  25. "title": "Contaced for more info",
  26. "value": 72
  27. },
  28. {
  29. "title": "Purchased",
  30. "value": 35
  31. },
  32. {
  33. "title": "Contacted for support",
  34. "value": 15
  35. },
  36. {
  37. "title": "Purchased additional products",
  38. "value": 8
  39. }
  40. ];
  41. AmCharts.ready(function () {
  42. chart = new AmCharts.AmFunnelChart();
  43. chart.rotate = true;
  44. chart.titleField = "title";
  45. chart.balloon.fixedPosition = true;
  46. chart.marginRight = 210;
  47. chart.marginLeft = 15;
  48. chart.labelPosition = "right";
  49. chart.funnelAlpha = 0.9;
  50. chart.valueField = "value";
  51. chart.startX = -500;
  52. chart.dataProvider = data;
  53. chart.startAlpha = 0;
  54. chart.write("chartdiv");
  55. });
  56. </script>
  57. </head>
  58. <body>
  59. <div id="chartdiv" style="width: 500px; height: 300px;"></div>
  60. </body>
  61. </html>