Chart图表
2016-09-13 20:22
134 查看
引用
<script src="Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="highcharts.js"></script>
先后顺序不能反
在body里给三个div分别给上id
饼图
$(function () {
$("#container").highcharts({ //图表展示容器,与div的id保持一致
chart: { //指定图表的类型,默认是折线图(line)
plotBackgroundColor: null,
//绘图区背景颜色
plotBorderWidth: null,
//绘图区边框宽度
plotShadow: false //绘图投影
},
title: { //头部
text: '饼子图'
},
tooltip: { //数据提示框
//单个点的格式化函数
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: { //图例事件,图例默认的点击行为是显示或隐藏当前数据列
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
//通过设置 legend.enabled = true | false 来打开或关闭图例
color: 'red',
connectorColor: 'blue',
format: '<b>{point.name}</b>: {point.percentage:.1f} %'
}
}
},
series: [
{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});
});
<script src="Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="highcharts.js"></script>
先后顺序不能反
在body里给三个div分别给上id
饼图
$(function () {
$("#container").highcharts({ //图表展示容器,与div的id保持一致
chart: { //指定图表的类型,默认是折线图(line)
plotBackgroundColor: null,
//绘图区背景颜色
plotBorderWidth: null,
//绘图区边框宽度
plotShadow: false //绘图投影
},
title: { //头部
text: '饼子图'
},
tooltip: { //数据提示框
//单个点的格式化函数
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: { //图例事件,图例默认的点击行为是显示或隐藏当前数据列
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
//通过设置 legend.enabled = true | false 来打开或关闭图例
color: 'red',
connectorColor: 'blue',
format: '<b>{point.name}</b>: {point.percentage:.1f} %'
}
}
},
series: [
{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});
});
相关文章推荐
- android图表框架 MPAndroidChart 学习记录
- MPAndroidChart开源图表库之饼状图
- 对比两个flash金融图表Stock Chart vs AnyStock
- 如何利用Chart FX for WPF创建Expression黑色图表样式
- AchartEngine 统计图表开发总结
- Chart原则: 没有万能图表,如果足够简单那么定制化是最好的
- RadCartesianChart图表控件对象名称的获取方法
- 如何使用一个不错的图表组件WebChart(免费)
- 笑谈Android图表-MPAndroidChart
- Asp.net 2.0 自定义控件开发[开发一个图表(WebChart)控件(柱状图示例)](示例代码下载)
- Asp.net 2.0 自定义控件开发[开发一个图表(WebChart)控件(柱状图示例)](示例代码下载)
- hellocharts-android图表库之柱状图:ColunmChartView
- Open Flash Chart + PHP + Mysql生成动态图表
- 【Android 应用开发】Android 图表绘制 achartengine 示例解析
- MpAndroidChart各种图表我都用了一遍,并且已经熟练掌握。总结我的Demo
- 图解Android图表绘制引擎-AChartEngine
- Google 图表(Chart) API 如何显示中文标签参数
- EXCEL图表工具箱—JWalk Chart Tools
- 免费Flash图表工具FusionChart
- Chart 图表 饼图