jQuery插件HighCharts繪制簡單2D柱狀圖效果示例【附demo源碼】
本文實(shí)例講述了jQuery插件HighCharts繪制簡單2D柱狀圖效果。分享給大家供大家參考,具體如下:
1、實(shí)例代碼:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HighCharts 2D柱狀圖</title>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
<script type="text/javascript">
$(function(){
$('#columnChart').highcharts({
chart: {
type: 'column'
},
title: {
text: '(jb51.net統(tǒng)計(jì))2016年月收入'
},
subtitle: {
text: '月收入'
},
xAxis: {
categories: [
'一月',
'二月',
'三月',
'四月',
'五月',
'六月',
'七月',
'八月',
'九月',
'十月',
'十一月',
'十二月'
]
},
yAxis: {
min: 0,
title: {
text: '收入 (¥)'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.1f} 元</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: '張三',
data: [4995, 7169, 1064, 7292, 2440, 4545, 6545, 9564, 1245, 4512, 6523, 4514]
}, {
name: '李思',
data: [8361, 2354, 4512, 2356, 4515, 6451, 9865, 5455, 8254, 6562, 6945, 2356]
}, {
name: '王武',
data: [4512, 9565, 6564, 2652, 3265, 1202, 7845, 9845, 2356, 7844, 5424, 6312]
}, {
name: '趙六',
data: [6523, 8956, 6531, 6532, 9864, 4552, 9564, 7845, 6523, 4512, 8956, 2356]
}]
});
});
</script>
</head>
<body>
<div id="columnChart" style="width: 1200px; height: 500px; margin: 0 auto"></div>
</body>
</html>
2、運(yùn)行效果圖如下:

附:完整實(shí)例代碼點(diǎn)擊此處本站下載。
更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jQuery常用插件及用法總結(jié)》、《jquery中Ajax用法總結(jié)》、《jQuery表格(table)操作技巧匯總》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常見經(jīng)典特效匯總》及《jquery選擇器用法總結(jié)》
希望本文所述對(duì)大家jQuery程序設(shè)計(jì)有所幫助。
- 在vue項(xiàng)目中引入highcharts圖表的方法(詳解)
- Vue 中使用vue2-highcharts實(shí)現(xiàn)top功能的示例
- Vue 中使用vue2-highcharts實(shí)現(xiàn)曲線數(shù)據(jù)展示的方法
- 在Vue中使用highCharts繪制3d餅圖的方法
- highcharts 在angular中的使用示例代碼
- 通過php動(dòng)態(tài)傳數(shù)據(jù)到highcharts
- jQuery插件HighCharts繪制簡單2D折線圖效果示例【附demo源碼】
- jQuery插件HighCharts繪制2D餅圖效果示例【附demo源碼下載】
- jQuery插件HighCharts實(shí)現(xiàn)氣泡圖效果示例【附demo源碼】
- highCharts提示框中顯示當(dāng)前時(shí)間的方法
相關(guān)文章
通過Jquery.cookie.js實(shí)現(xiàn)展示瀏覽網(wǎng)頁的歷史記錄超管用
本文給大家分享利用cookie插件獲取用戶瀏覽文章或者是網(wǎng)頁的歷史記錄,并把用戶最近瀏覽過的信息顯示在頁面,涉及到 jquery.cookie.js相關(guān)知識(shí),感興趣的朋友可以參考下2015-10-10
jquery實(shí)現(xiàn)適用于門戶站的導(dǎo)航下拉菜單效果代碼
這篇文章主要介紹了jquery實(shí)現(xiàn)適用于門戶站的導(dǎo)航下拉菜單效果代碼,可實(shí)現(xiàn)鼠標(biāo)滑過菜單項(xiàng)實(shí)現(xiàn)下拉列表顯示效果的功能,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-08-08
jQuery中ajax的load()與post()方法實(shí)例詳解
這篇文章主要介紹了jQuery中ajax的load()與post()方法,結(jié)合實(shí)例詳細(xì)分析了jQuery中l(wèi)oad()與post()方法實(shí)現(xiàn)ajax交互的相關(guān)技巧與注意事項(xiàng),需要的朋友可以參考下2016-01-01
Jquery 方塊隨著鼠標(biāo)所在的區(qū)域而放大
下面都是默認(rèn)一樣大小的方塊,當(dāng)鼠標(biāo)放到你想要放的位置,則當(dāng)前位置的方塊則放大。2010-05-05
jQuery實(shí)現(xiàn)提示密碼強(qiáng)度的代碼
本文給大家介紹的是一個(gè)非常常見的功能,在輸入密碼的時(shí)候提示密碼的強(qiáng)度,本文使用jQuery來實(shí)現(xiàn),有需要的小伙伴可以參考下。2015-07-07
jQuery 過濾not()與filter()實(shí)例代碼
下面兩種寫法,都可以達(dá)到一樣的效果,not與filter是相反的過濾2012-05-05
Jquery uploadify圖片上傳插件無法上傳的解決方法
很多的朋友都有遇到Jquery uploadify圖片上傳插件無法上傳的情況,下面為大家介紹下不錯(cuò)的解決方法,感興趣的朋友可以參考下2013-12-12

