Witam, jak można połączyć ten jquery z php. Znalazłem takie biblioteki http://www.highcharts.com/demo/?example=li...p;theme=default , chcę wyświetlać swoje dane z bazy mysql, ale nie umie napisać kody (zmienna name i data )

  1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  2. <title>Highcharts Example</title>
  3.  
  4.  
  5. <!-- 1. Add these JavaScript inclusions in the head of your page -->
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  7. <script type="text/javascript" src="../js/highcharts.js"></script>
  8.  
  9. <!-- 1a) Optional: the exporting module -->
  10. <script type="text/javascript" src="../js/modules/exporting.js"></script>
  11.  
  12.  
  13. <!-- 2. Add the JavaScript to initialize the chart on document ready -->
  14. <script type="text/javascript">
  15.  
  16. var chart;
  17. $(document).ready(function() {
  18. chart = new Highcharts.Chart({
  19. chart: {
  20. renderTo: 'container',
  21. defaultSeriesType: 'line',
  22. marginRight: 130,
  23. marginBottom: 25
  24. },
  25. title: {
  26. text: 'Monthly Average Temperature',
  27. x: -20 //center
  28. },
  29. subtitle: {
  30. text: 'Source: ',
  31. x: -20
  32. },
  33. xAxis: {
  34. categories: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec',
  35. 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopda', 'Grudzień']
  36. },
  37. yAxis: {
  38. title: {
  39. text: 'Temperature (°C)'
  40. },
  41. plotLines: [{
  42. value: 0,
  43. width: 1,
  44. color: '#808080'
  45. }]
  46. },
  47. tooltip: {
  48. formatter: function() {
  49. return '<b>'+ this.series.name +'</b><br/>'+
  50. this.x +': '+ this.y +'°C';
  51. }
  52. },
  53. legend: {
  54. layout: 'vertical',
  55. align: 'right',
  56. verticalAlign: 'top',
  57. x: -10,
  58. y: 100,
  59. borderWidth: 0
  60. },
  61. series: [{
  62. name: 'Czechy',
  63. 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]
  64. }, {
  65. name: 'Węgry',
  66. 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]
  67. }, {
  68. name: 'Słowacja',
  69. 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]
  70. }, {
  71. name: 'Polska',
  72. data: [11.5, 12.2, 15.7, 18.5, 19.9, 22.2, 27.0, 29.6, 25.2, 22.3, 16.6, 14.8]
  73. },
  74. {
  75. name: 'Niemcy,
  76. 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]
  77. }]
  78. });
  79.  
  80.  
  81. });
  82.  
  83. </script>
  84.  
  85. </head>
  86. <body>
  87.  
  88. <!-- 3. Add the container -->
  89. <div id="container" style="width:800px; height: 400px; margin: 0 auto"></div>
  90.  
  91.  
  92. </body>
  93.