标签:
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="js/httpcdn.hcharts.cnjqueryjquery-1.8.3.min.js"></script> //highcharts有相应的js文件
<script type="text/javascript" src="js/httpcdn.hcharts.cnhighchartshighcharts.js"></script> //highcharts有相应的js文件
<script type="text/javascript" src="js/httpcdn.hcharts.cnhighchartsexporting.js"></script> //highcharts有相应的js文件
<script>
//左侧Javascript代码
$(function () {
$(‘#container‘).highcharts({
chart: {
// type: ‘bar‘ //条形图
type: ‘column‘ //柱状图
},
title: {
text: ‘区域客户数量‘
},
subtitle: {
text: ‘‘
},
xAxis: {
categories: [‘香港特别行政区‘,‘四川省‘,‘江西省‘,‘云南省‘,‘广西壮族自治区‘,‘辽宁省‘,‘上海市‘,‘陕西省‘,‘海南省‘,‘北京市‘,‘浙江省‘,‘贵州省‘,‘吉林省‘,‘福建省‘,‘新疆维吾尔自治区‘,‘青海省‘,‘天津市‘,‘澳门特别行政区‘,‘江苏省‘,‘甘肃省‘,‘重庆市‘,‘山西省‘,‘西藏自治区‘,‘安徽省‘,‘河南省‘,‘内蒙古自治区‘,‘宁夏回族自治区‘,‘广东省‘,‘黑龙江省‘,‘台湾省‘,‘山东省‘,‘河北省‘,‘湖北省‘,‘湖南省‘],
title: {
text: null
} ,
labels: { //修改字体格式,斜体等属性
rotation: -45,
style: {
fontSize: ‘13px‘,
fontFamily: ‘Verdana, sans-serif‘
}
}
},
yAxis: {
min: 0,
title: {
text: ‘区域客户数量(人)‘,
align: ‘high‘
},
labels: {
overflow: ‘justify‘
}
},
tooltip: {
valueSuffix: ‘ 人‘
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: ‘vertical‘,
align: ‘right‘,
verticalAlign: ‘top‘,
x: -40,
y: 100,
floating: true,
borderWidth: 1,
backgroundColor: ‘#FFFFFF‘,
shadow: true
},
credits: {
enabled: false
},
series: [{
name: ‘区域客户数量(人)‘,
data: [3000,5000,6500,10000,11000,20000,20000,20000,20000,20000,20000,40000,40000,43000,44000,50000,50000,50000,51000,55000,60000,66000,70000,70000,73000,78000,80000,88000,89000,90000,98000,100000,200000,300000]
}/*, {
name: ‘Year 1900‘,
data: [133, 156, 947, 408, 6]
}, {
name: ‘Year 2008‘,
data: [973, 914, 4054, 732, 34]
} */ ]
});
});
</script>
</head>
<body>
<div id="container" style="min-width:1200px;height:600px"></div>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/zigewb/p/4549608.html