将每个工具提示放置在图表中 [英] Positioning each tooltip in highchart
本文介绍了将每个工具提示放置在图表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Highchart库创建可变饼图.
I'm using Highchart library for creating variablepie chart.
我对使用该库有一些疑问:
I have a few questions about using that library:
- 是否可以为每个部分定位工具提示?
- 在工具提示框内,我需要将值"float-right"对齐.是否有可能? 3.是否可以更改工具提示框和光标指针的高度?
URL: https://jsfiddle.net/BlackLabel/eom8tqns/
tooltip: {
headerFormat: '',
padding: 0,
pointFormat: '<span style="color:{point.color}">\u25CF</span> <b>
{point.name}</b><br/>' +
'Area (square km): <b>{point.y}</b><br/>' +
'Population density (people per square km): <b>{point.z}</b><br/>'
},
推荐答案
要正确对齐值并更改工具提示的高度,请设置适当的CSS样式:
To align values right and change the height of the tooltip set appropriate CSS styles:
.highcharts-tooltip {
text-align: right;
}
.highcharts-tooltip > span {
height: 100px;
}
可以在系列属性中设置光标:
The cursor can be set in series properties:
series: [{
cursor: 'pointer',
data: data
}]
演示:
API参考:
这篇关于将每个工具提示放置在图表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文