<script type="text/javascript">
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',//设置显示图表的容器
type: 'line',//设置图表样式,可以为line,spline, scatter, splinearea bar,pie,area,column
// defaultSeriesType: 'column', //图表的默认样式
// margin:[21, 23, 24, 54],//整个图表的位置(上下左右的空隙)
marginRight: 200,//右边间距
marginBottom: 25//底部间距/空隙
// inverted: false,//可选,控制显示方式,默认上下正向显示
// shadow:true,//外框阴影
// backgroundColor:"#FFF",
// animation:true,
// borderColor:"#888",
// borderRadius:5,
// borderWidth:1,
// ignoreHiddenSeries:true,
// reflow:true,
// plotBorderWidth:1,
// alignTicks:true
},
labels:{//在报表上显示的一些文本
items:[{
html:'本图表数据有误,仅用于说明相应的属性',
style:{left:'100px',top:'60px'}
}, {
html:'http://www.highcharts.com/demo',
style:{left:'100px',top:'100px'}
}]
},
credits:{//右下角的文本
enabled: true,
position: {//位置设置
align: 'right',
x: -10,
y: -10
},
href: "http://www.highcharts.com",//点击文本时的链接
style: {
color:'blue'
},
text: "Highcharts Demo"//显示的内容
},
// plotOptions:{//绘图线条控制
// spline:{
// allowPointSelect :true,//是否允许选中点
// animation:true,//是否在显示图表的时候使用动画
// cursor:'pointer',//鼠标移到图表上时鼠标的样式
// dataLabels:{
// enabled :true,//是否在点的旁边显示数据
// rotation:0
// },
// enableMouseTracking:true,//鼠标移到图表上时是否显示提示框
// events:{//监听点的鼠标事件
// click: function() {
// }
// },
// marker:{
// enabled:true,//是否显示点
// radius:3,//点的半径
// fillColor:"#888"
// lineColor:"#000"
// symbol: 'url(http://highcharts.com/demo/gfx/sun.png)',//设置点用图片来显示
// states:{
// hover:{
// enabled:true//鼠标放上去点是否放大
// },
// select:{
// enabled:false//控制鼠标选中点时候的状态
// }
// }
// },
// states:{
// hover:{
// enabled:true,//鼠标放上去线的状态控制
// lineWidth:3
// }
// },
// stickyTracking:true,//跟踪
// visible:true,
// lineWidth:2//线条粗细
// pointStart:100,
// }
// },
title: {
text: 'Monthly Average Temperature',//标题
x: -20 //center设置标题的位置
},
subtitle: {
text: 'Source: WorldClimate.com',//副标题
x: -20//副标题位置
},
xAxis: {//横轴的数据
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
// lineWidth:1,//纵轴一直为空所对应的轴,即X轴
// plotLines: [{//一条竖线
// color: '#FF0000',
// width: 2,
// value: 5.5
// }]
// labels: {//设置横轴坐标的显示样式
// rotation: -45,//倾斜度
// align: 'right',
// style: {
// font: 'normal 13px Verdana, sans-serif'
// color: 'white'
// }
// }
},
yAxis: {
// tickInterval: 200, //自定义刻度
// max:1000,//纵轴的最大值
// min: 0,//纵轴的最小值
title: {//纵轴标题
text: '百分数'
},
labels : {
formatter : function() {//设置纵坐标值的样式
return this.value + '%';
}
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {//鼠标移到图形上时显示的提示框
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y +'°C';
}
// crosshairs:[{//控制十字线
// width:1,
// color:"#CCC",
// dashStyle:"longdash"
// }
},
legend: {//方框所在的位置(不知道怎么表达)
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{//以下为纵轴数据
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'New York',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
}, {
name: 'Berlin',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
}, {
name: 'London',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
}]
});
});
</script>
相关推荐
Highcharts api 中文文档 ,
近期用到Highcharts,但公司上网不方便,网络上也没有找到其他的离线API。无奈只好自己决定制作一个,花了3个小时终于制作好了,现在放上来与大家分享,顺便也挣点辛苦积分。 需要放在web服务器上运行,如tomcat。
Highcharts 是一个用纯JavaScript编写的一个图表库, 能够很简单便捷的在web网站或是web应用程序添加有交互性的图表,并且免费提供给个人...这是Highcharts常用的中文帮助文档,希望对喜欢研究Highcharts的人有些帮助。
HightCharts 给予jQuery的图表绘制js库,功能十分强大,兼容性良好。此文件于2012-1-8下载自官方网站,压缩包包含highcharts库及其官方说明文档。
Highcharts 最新3.0版离线API文档 网上能找到的都是2.X版本的,而且整理得也不怎么好 这个插件效果非常牛B,但官网API 文档不提供下载,而且访问也不怎么稳定,实在非常冒火 于是花了点时间把官网的相关资源扒下来,...
NULL 博文链接:https://m15047453160.iteye.com/blog/2145702
比较流行的报表展示JS框架,本文档能让初学者迅速掌握Highchart的使用。
因官网不支持api文档下载,而在线访问的速度亲你是知道的,慢得要死。所以我花了一点时间扒下了文档,改了部分js,做了一个离线的API文档。(其中只有plotOptions里缺了errorbar和waterfall,感觉用不到就没抓这部分了...
highcharts参考文档API,详细描述highcharts中的每个属性的注释和用法,绝对实用
Highcharts-4.0.4含中文API,Highcharts 是一个用纯JavaScript编写的一个图表库,HighCharts特点:1.兼容性:HighCharts采用纯JavaScript编写,兼容当今大部分的浏览器,包括Safari、IE和火狐等等; 2.图表类型众多:...
HighCharts_详细使用及API文档说明
highcharts--基本使用手册(中文API).doc
中文版的Highcharts文档(内涵Highstock)
Highcharts 3.02 API离线帮助手册,从官网下载制作而成。
Highcharts&Highstock中文API文档
官方文档 https://api.hcharts.cn/
Higcharts官网帮助文档离线版!在线看官网文档,真是纠结,总是打不开!郁闷,一狠心,花了几个小时,整个一个离线版~使用Highcharts,你们的福音到了~
版本虽然有点老,但相对于离线帮助文档来说已经够用了
这个里面有关于HighCharts的一些API文档,以及一些小的Demo还有一些属性截图,方便大家使用及学习
里面有网页格式的帮助文档,有chm类型的帮助文档,还有例子,网站的帮助文档要从Highcharts - Options Reference2文件开始,以上内容来自其他地方收集