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

你可能感兴趣的:(highcharts坐标轴中显示文字)