|
|
|
jQuery Chart - ต้องการ Include javascript เข้า html ไม่ทราบว่าทำยังไงครับ |
|
|
|
|
|
|
|
Code (PHP)
<!DOCTYPE html><html class="">
<head><meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="http://s.codepen.io/assets/reset/normalize.css"><script src="http://s.codepen.io/assets/libs/prefixfree.min.js"></script>
<style>html {
padding: 15px;
}</style></head><body>
<div class="chart--bar" style="width:260px;height:170px"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script src="http://code.highcharts.com/highcharts.js"></script>
<script>$( '.chart--bar' ).highcharts({
"chart": {
"type": "bar"
},
"credits": {
"enabled": false
},
"title": null,
"plotOptions": {
"bar": {
"pointWidth": 25,
"color": "#90d6f3",
"colorByPoint": true,
"colors": [
"#90d6f3",
"#61c5ef",
"#0fa0dd"
]
},
},
"xAxis": {
"min": 0,
"title": {
"text": null
},
"labels": {
"style" : {
"textTransform": "uppercase",
"color": "#222"
}
},
"categories": [
"Chris",
"Jeff",
"Luke"
]
},
"yAxis": {
"title": {
"text": "Posts by People",
"margin": 15,
"style": {
"fontSize": "10px",
"fontWeight": "normal",
"textTransform": "uppercase",
"color": "#bbb"
}
},
"labels": {
"style" : {
"fontSize": "12px",
"color": "#222"
}
}
},
"legend": {
"enabled": false
},
"series": [
{
"type": "bar",
"data": [
280000,
160000,
80000
]
}
]
});//@ sourceURL=pen.js
</script>
</body></html>
ตัวอย่างครับ
|
|
|
|
|
Date :
2014-01-27 10:11:47 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|