Advertisement
Guest User

HighCharts-Java

a guest
Sep 8th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.78 KB | None | 0 0
  1. "<html> " +
  2. "<head> " +
  3. "<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script> " +
  4. "<script src='http://code.highcharts.com/highcharts.js'></script> " +
  5. "<script src='http://code.highcharts.com/modules/exporting.js'></script> " +
  6. "<script> " +
  7. "$(function () { " +
  8. "    var chart; " +
  9. "    $(document).ready(function() { " +
  10. "        chart = new Highcharts.Chart({ " +
  11. "            chart: { " +
  12. "                renderTo: 'container', " +
  13. "                type: 'line', " +
  14. "                marginRight: 130, " +
  15. "                marginBottom: 25 " +
  16. "            }, " +
  17. "            title: { " +
  18. "                text: 'Monthly Average Temperature', " +
  19. "                x: -20 //center " +
  20. "            }, " +
  21. "            subtitle: { " +
  22. "                text: 'Source: WorldClimate.com', " +
  23. "                x: -20 " +
  24. "            }, " +
  25. "            xAxis: { " +
  26. "                categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', " +
  27. "                    'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] " +
  28. "            }, " +
  29. "            yAxis: { " +
  30. "                title: { " +
  31. "                    text: 'Temperature (°C)' " +
  32. "                }, " +
  33. "                plotLines: [{ " +
  34. "                    value: 0, " +
  35. "                    width: 1, " +
  36. "                    color: '#808080' " +
  37. "                }] " +
  38. "            }, " +
  39. "            tooltip: { " +
  40. "                formatter: function() { " +
  41. "                        return '<b>'+ this.series.name +'</b><br/>'+ " +
  42. "                        this.x +': '+ this.y +'°C'; " +
  43. "                } " +
  44. "            }, " +
  45. "            legend: { " +
  46. "                layout: 'vertical', " +
  47. "                align: 'right', " +
  48. "                verticalAlign: 'top', " +
  49. "                x: -10, " +
  50. "                y: 100, " +
  51. "                borderWidth: 0 " +
  52. "            }, " +
  53. "            series: [{ " +
  54. "                name: 'Tokyo', " +
  55. "                data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] " +
  56. "            }, { " +
  57. "                name: 'New York', " +
  58. "                data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5] " +
  59. "            }, { " +
  60. "                name: 'Berlin', " +
  61. "                data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0] " +
  62. "            }, { " +
  63. "                name: 'London', " +
  64. "                data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8] " +
  65. "            }] " +
  66. "        }); " +
  67. "    }); " +
  68. "     " +
  69. "}); " +
  70. "</script> " +
  71. "</head> " +
  72. "<body> " +
  73. "<div id='container' style='min-width: 400px; height: 400px; margin: 0 auto'></div> " +
  74. "​</body> " +
  75. "</html> "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement