highcharts画面积图
2016-01-19 13:14
246 查看
$(function () { var categories= [ '前五日', '前四日', '前三日', '前两日', '前一日', '后一日', '后两日', '后三日', '后四日', '后五日' ]; $('#container').highcharts({ chart: { type: 'areaspline', zoomType:'x', width:660, height:260 //padding:0 }, colors:['#65b5f3','#ff9399','#cdcdcd'], exporting:{ enabled:false }, title: { text: '' }, legend: { enabled:false, //layout: 'horizon', align: 'left', verticalAlign: 'top', x: 300, y: -10, floating: true, //borderWidth: .1, //backgroundColor: '#FFFFFF', //margin:14, symbolWidth:14, symbolHeight:3, //padding:10, width:300 }, xAxis: { lineColor:"#efefef", tickLength:0, color:'#8d8d8d', labels:{ style:{ color:"#8d8d8d" }, formatter:function(){ return categories[this.value]; } } //tickInterval:1 }, yAxis: { title: { text: '' }, lineWidth:1, gridLineWidth:1, tickInterval:1, tickColor:'red', gridLineColor:'#efefef', lineColor:"#efefef", labels:{ style:{ color:"#8d8d8d" } } }, tooltip: { shared: true, valueSuffix: ' units', backgroundColor:'#2c3238', crosshairs: { width: 1, color: '#777', dashStyle: 'dash' }, style:{ color:'#fff' }, formatter:function(){ var data = this.points; var html = ""; for(var i = 0 ; i < data.length; i++){ html+= "<span>"+data[i].series.name+":"+data[i].y+"</span><br>"; }
return html; } }, credits: { enabled: false }, plotOptions: { areaspline: { fillOpacity: 0.2, lineWidth:1, marker:{ states:{ hover:{ enabled:false } } } }, series : { marker:{ enabled:false }, states:{ hover:{ lineWidth:1 } } }, area:{ marker:{ states:{ hover:{ lineWidth:1 //去掉区域边界线加粗的效果 } } } } }, series: [{ name: '2015年', data: [10, 4, 1, 5, 4, 10, 12,1,9] }, { name: '2014年', data: [0, 3, 4, 1, 3, 10, 4,1,9] }, { name: '2013年', data: [11, 11, 9, 1, 3, 1, 4,2,9] }] }); });
相关文章推荐
- php读取某文件夹下的所有文件,并按文件的修改时间降序输出
- php 数组分页输出函数
- Swarm创建docker集群:服务发现-etcd
- hibernate 数据库问题
- RH413企业安全加固 第8章 监视文件系统变更
- MVC缓存OutPutCache学习笔记 (一) 参数配置
- 使用fprof基本步骤
- 正则表达式
- 38-语言入门-38-Coin Test
- CSS中关于margin的理解误区
- 指定具体的时间,根据传入的值对当前时间做相应的操作
- php yaf扩展安装不成功的原因之一yaf版本与操作系统位数不匹配
- 四个地址的转换进行分析
- 达观数据文辉:Hadoop和Hive使用经验
- .NET站点导航之TreeView控件绑定数据库
- mysql主从复制(超简单)
- SQL server替换字符串
- 37-语言入门-37-无线网络覆盖
- Android studio运行project出现了Installation failed since the device possibly has stale dexed jars...的问题
- IplImage结构体