highcharts坐标轴中显示文字

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文档

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值