从柱形图中删除悬停效果

时间:2015-03-21 06:25:45

标签: php jquery highcharts

我想删除column图表悬停时的方括号效果。我 attahced 截图。 PHP代码生成的JSON代码。

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Monthly Average Rainfall'
        },
        subtitle: {
            text: 'Source: WorldClimate.com'
        },
        xAxis: {
            categories: [
                'Jan',
                'Feb',
                'Mar'
            ],
            crosshair: true
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Rainfall (mm)'
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
        series: [{
            name: 'Tokyo',
            data: [49.9, 71.5, 106.4]

        }, {
            name: 'New York',
            data: [83.6, 78.8, 98.5]

        }]
    });
});

对于演示http://jsfiddle.net/mvsrdzg4/

1 个答案:

答案 0 :(得分:4)

尝试此操作以删除悬停效果,

 xAxis: {
        categories: [
            'Jan',
            'Feb',
            'Mar'
        ],
        crosshair: false
    },