请检查下面的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中正确渲染点悬停的光晕效果。我要使用模式,同时想在点悬停上实现光环效果。对此有何帮助?
答案 0 :(得分:0)
只需为光环设置更高的 states: {
hover: {
halo: {
attributes: {
zIndex: 10
}
}
}
}
:http://jsfiddle.net/ErU8H/542/
import ctypes
lib = ctypes.cdll.LoadLibrary(None)
prctl = lib.prctl
prctl.restype = ctypes.c_int
prctl.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_ulong,
ctypes.c_ulong, ctypes.c_ulong]
def set_proctitle(new_title):
result = prctl(15, new_title, 0, 0, 0)
if result != 0:
raise OSError("prctl result: %d" % result)