使用highchart.js
来源:互联网 发布:js正则表达式大全 编辑:程序博客网 时间:2024/05/22 06:08
使用highchar.js
注意内容
script要写在body前,不然显示不了。
html部分<div id="container_column" style="min-width: 310px; height:220px; margin: 20px auto 5px"></div><div id="container_line" style="min-width: 310px; height:220px; margin: 20px auto 5px"></div> <div id="container_pie" style="min-width: 310px; height:220px; margin: 20px auto 5px"></div>
script部分 <script type="text/javascript" src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script> <script type="text/javascript"> $(function () { // Create the chart $('#container_column').highcharts({ credits: { text: ' ', href: ' ' }, chart: { type: 'column' }, title: { text: '' }, subtitle: { text: '' }, xAxis: { type: 'category' }, yAxis: { title: { text: '' } }, legend: { enabled: false }, plotOptions: { series: { borderWidth: 0, dataLabels: { enabled: true, format: '{point.y:.1f}分' } } }, tooltip: { headerFormat: '<span style="font-size:3px">{series.name}</span><br>', pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}分</b><br/>' }, series: [{ name: '成绩', colorByPoint: true, data: [{ name: '语文', y: 119, drilldown: '' }, { name: '数学', y: 91, drilldown: '' }, { name: '外语', y: 130, drilldown: '' }, { name: '物理', y: 110, drilldown: '' }, { name: '化学', y:90, drilldown: '' }, { name: '生物', y:110, drilldown: '' }] }], colors: [ '#f7672a', '#1596F1', '#f7672a', '#f7672a', '#21E4DE', '#21E4DE' ] }); }); </script> <script type="text/javascript"> $(function () { $('#container_line').highcharts({ chart: { type: 'line' }, credits: { text: ' ', href: ' ' }, title: { text: '' }, subtitle: { text: '' }, plotOptions: { series: { borderWidth: 0, dataLabels: { enabled: true, format: '{point.y:.1f}%' } } }, xAxis: { categories: ['第一次', '第二次', '第三次', '第四次', '第五次', '第六次'], lineColor:['#000'] }, yAxis: { title: { text: '' } }, plotOptions: { line: { dataLabels: { enabled: true, format:'{point.y:.1f}%' }, enableMouseTracking: true } }, series: [{ name: ' ', data: [65, 60, 45, 60, 90, 30] }] }); }); </script> <script type="text/javascript"> $(function () { $('#container_pie').highcharts({ chart: { type: 'pie', options3d: { enabled: true, alpha: 45, beta: 0 } }, credits: { text: ' ', href: ' ' }, title: { text: '' }, tooltip: {// pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', depth: 35, dataLabels: { enabled: true, format: '{point.name}' } } }, series: [{ type: 'pie', name: '', data: [ ['已交作业(75%)', 75.0], { name: '未交作业(25%)', y: 25, sliced: true, selected: true }, ] }],colors: [ '#f7672a', '#1596F1' ] }); }); </script>
主要看hightchar中文文档。资料充足
0 0
- 使用highchart.js
- highchart使用
- HighChart使用总结
- ExtJs中使用highChart
- vue中使用highchart
- highchart
- highchart
- highchart
- 使用highChart做报表统计
- 关于学习使用highchart插件
- 异步刷新形式使用HighChart
- 使用HighChart的一些心得
- 关于使用highchart控件的心得。。
- 使用highchart无数据时的样式
- highChart另类使用及一些属性
- iOS中画图表 使用HighChart
- highchart使用与图像动态代码
- highchart使用与图像动态代码
- Android Studio
- 动态创建ImageView
- dbcp连接池
- java读写Excel(JXL)
- 【高斯消元】[CTSC2001 D2]GPA排名系统
- 使用highchart.js
- 8168开机自动挂载nfs
- NSUrlSession NSUrlConnection https连接时证书无效的解决办法
- iOS添加左右导航按钮
- 网络爬虫介绍(待完善)
- 不读完你不会成功
- java 反编译
- 【cocos2dx】 图片格式的区别 png jpg pvr
- ubuntu 14.04 no valid active connections found