rom*_*ads 4 javascript maps highcharts
我在Highcharts Maps库中遇到了一些问题.如何删除黑色dataLabels边框?
这是我的设置:
var Map = $('#container').highcharts('Map', {
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {
min: 0
},
series : [{
mapData: Highcharts.maps['gbpostcodes'],
dataLabels: {
enabled: true,
fontSize:'20px',
color:'yellow',
borderWidth: 0,
format: '{point.properties.Name}'
}
}]
});
Run Code Online (Sandbox Code Playgroud)
小智 9
用于修复此问题的Highcharts V5代码是
dataLabels: {
style: {
textOutline: 0
},
}
Run Code Online (Sandbox Code Playgroud)
这为我完成了工作:
plotOptions: {
series: {
dataLabels: {
style: {
textOutline: 0,
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
你肯定可以。请参阅此处有关dataLabels的 API 文档。要删除边框集:
dataLabels: {
...
borderWidth: 0,
...
},
Run Code Online (Sandbox Code Playgroud)
如果您正在谈论文本阴影,您也可以在 dataLabel 中执行此操作:
dataLabels: {
enabled: true,
fontSize: '20px',
color: 'yellow',
borderWidth: 0,
format: '{point.properties.Name}',
style: {
textShadow: false
}
},
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4344 次 |
| 最近记录: |