您的位置:首页 > 其它

highcharts坐标轴中显示文字

2015-10-25 17:54 295 查看
http://code.hcharts.cn/hcharts.cn/hhhGfX

原来的例子

$(function () {
$('#container').highcharts({
xAxis: {
plotBands: [{ // mark the weekend
color: '#FCFFC5',
from: Date.UTC(2010, 0, 2),
to: Date.UTC(2010, 0, 4),
zIndex: 2,
label: {
text: '我是x轴标示区',
verticalAlign: 'middle',
style: {
fontSize: '12px',
fontWeight: 600
}

}
}],
tickInterval: 24 * 3600 * 1000, // one day
type: 'datetime'
},

yAxis: {
plotBands: [{
from: 100,
to: 150,
color: '#f9f9f9',
zIndex: 1
}]
},

series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 24 * 3600 * 1000
}]
});


按照自己的要求修改后的,看看能不能显示在指定坐标位置。或者找DataLabels试试看

xAxis: [{
plotBands: [{ // mark the weekend
//color: '#FCFFC5',//设置背景颜色
from: 1,//Date.UTC(2010, 0, 2),
to: 2,//Date.UTC(2010, 0, 4),
zIndex: 2,
label: {
text: '我是x轴标示区',
verticalAlign: 'bottom',
style: {
fontSize: '12px',
fontWeight: 600
}

}
}],

http://www.hcharts.cn/
学习一下“开始学习Highcharts"及API文档
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: