0

请检查下面的jsfiddle。

http://jsfiddle.net/ErU8H/537/

var gfxPath = ' http://www.highcharts.com/components/com_demo/assets/demo/gfx/ ';

var chart = new Highcharts.Chart({

chart: {
    renderTo: 'container'
},

title: {
    text: 'Pattern fill plugin demo'
},

xAxis: {
    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},

yAxis: {
    plotBands: [{
        from: 100,
        to: 200,
        color: {
            pattern: gfxPath + 'pattern3.png',
            width: 6,
            height: 6
        }
    }]
},

series: [{
    type: 'area',
    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
    fillColor: {
        pattern: gfxPath + 'pattern1.png',
        width: 6,
        height: 6
    },
    states: {
                        hover: {
                            halo: {
                                size: 8,
                                opacity: 1,
                                zIndex:10,
                                attributes: {
                                    fill: '#ffffff',
                                    'stroke-width': 1,
                                    stroke: '#0b9de8'
                                }
                            }
                        }
                    }
}, {
    type: 'column',
    data: [148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6],
    color: {
        pattern: gfxPath + 'pattern2.png',
        width: 6,
        height: 6,
        // VML only:
        color1: 'red',
        color2: 'yellow'
    }
}]

});

仅当我们使用图案填充插件时,点悬停的光环效果在 chrome 和 firefox 中无法正确渲染。我必须使用模式,同时想在点悬停时实现光环效果。对此有任何帮助吗?

4

1 回答 1

0

只需将zIndex光环设置得更高:http: //jsfiddle.net/ErU8H/542/

    states: {
        hover: {
            halo: {
                attributes: {
                    zIndex: 10   
                }
            }
        }
    }
于 2015-06-30T09:27:34.000 回答