jQuery, highcharts,
http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
<script type="text/javascript">
data4 =[[ ' UNREACH.GEN ' , 35.9 ] , [ ' ABR ' , 33.2 ] , [ ' NPD.FUNC.MUST ' , 6.2 ] , [ ' SV.FMT_STR.PRINT_FORMAT_MISMATCH.UNDESIRED ' , 5.1 ] , [ ' UNINIT.STACK.MIGHT ' , 3.1 ] , [ ' NPD.FUNC.MIGHT ' , 2.6 ] , [ ' NPD.CHECK.MIGHT ' , 1.8 ] , [ ' RH.LEAK ' , 1.2 ] , [ ' UNINIT.STACK.MUST ' , 1 ] , [ ' LOCRET.ARG ' , 1 ] , [ ' Others ' , 8.8 ]]
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'codespiechart'
},
title: {
text: 'Top 10 Codes'
},
plotArea: {
shadow: null,
borderWidth: null,
backgroundColor: null
},
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.y +' %';
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#FFFFFF',
connectorColor: '#BDBDBD',
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.y +' %';
}
}
}
},
series: [{
type: 'pie',
name: 'codespiechart',
data: data4
}]
});
});
</script>
jQuery & highcharts
转载文章标签 jquery ajax javascript 前端 数据 数据库 编程语言 文章分类 代码人生

-
強大的jQuery Chart组件-Highcharts
Highcharts是一个制作图表的纯Javascript类库,主要特性如
javascript html jquery -
highcharts
Highcharts是一个制作图表的纯Javascript类库,主要特性如下:兼容性:兼容当今所有的浏览器,包括iPhone、IE和火狐等等;对个
php javascript ViewUI 提示信息 柱状图