|  |  | 
          
            | <!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Highcharts Example</title>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
		<script type="text/javascript">
$(function () {
		
        $('#container').highcharts({
			
            chart: {
                zoomType: 'xy'
            },
            title: {
                text: 'Average Monthly Temperature and Rainfall in Tokyo@AToM'
            },
            subtitle: {
                text: 'Source: WorldClimate.com'
            },
            xAxis: [{
                categories: ['Jan(ม.ค.)', 'Feb(ก.พ.)', 'Mar(มี.ค.)', 'Apr(เม.ย)', 'May(พ.ค.)', 'Jun(มิ.ย.)',
                    'Jul(ก.ค.)', 'Aug(ส.ค.)', 'Sep(ก.ย.)', 'Oct(ต.ค.)', 'Nov(พ.ย)', 'Dec(ธ.ค.)']
            }],
            yAxis: [{ // Primary yAxis
                labels: {
                    format: '{value} Kw/H',
                    style: {
                        color: '#89A54E'
                    }
                },
                title: {
                    text: 'Kilowatt/Hour',
                    style: {
                        color: '#89A54E'
                    }
                }
            }, { // Secondary yAxis
                title: {
                    text: 'Money',
                    style: {
                        color: '#4572A7'
                    }
                },
                labels: {
                    format: '{value} BAHT(บาท)',
                    style: {
                        color: '#4572A7'
                    }
                },
                opposite: true
            }],
            tooltip: {
                shared: true
            },
            legend: {
                layout: 'vertical',
                align: 'left',
                x: 120,
                verticalAlign: 'top',
                y: 100,
                floating: true,
                backgroundColor: '#FFFFFF'
            },
            series: [{
                name: 'Money',
                color: '#4572A7',
                type: 'column',
                yAxis: 1,
                data: [ข้อมูลจากดาต้าเบส fieldA],
                tooltip: {
                    valueSuffix: ' ฺBAHT(บาท)'
                }
    
            }, {
                name: 'Kilowatt/Hour',
                color: '#89A54E',
                type: 'spline',
                data: [ข้อมูลจากดาต้าเบส fieldB],
                tooltip: {
                    valueSuffix: ' Kilowatt/Hour'
                }
            }]
        });
    });
    
		</script>
	</head>
	<body>
<script src="../../js/highcharts.js"></script>
<script src="../../js/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
	</body>
</html>
 
 
 Tag : PHP, MySQL
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2014-05-05 11:39:40 | By :
                          sorasit | View :
                          815 | Reply :
                          1 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |