Highcharts根据数据系列值自定义显示工具提示 [英] Highcharts Custom display of tooltips, based on data series values
问题描述
我可以更好地解释一下,如果你可以关注这里附上的图片:
-
悬停线高度只能显示到最大线高(请参阅下图)
-
我不想显示第一周和最后一周的悬停值。 (我的意思是在'第0周'悬停时,我不想显示悬停框,与'第7周'一样)。
我可以设置吗?每一系列数据的底线和天花板,有些事情如:$ {
系列:[{
名称:'CPM',
data:[5,524 ,4,1,4,1,3,20,3],
color:'rgb(87,188,0)'
// floor:5,
// ceiling: 524,
},{....}
}]
例如每个数据集的最小/最小值和最大值/最小值。
这样,其他两个系列数据就可以在图表中看到。如何显示所有数据系列小提琴jsfiddle.net/4vzEt/21 /
img src =https://i.stack.imgur.com/ZmbYT.pngalt =请在这里输入图片描述>
因为它不允许,所以不能把小提琴作为链接。请帮助我,达到这些要点。
- 你能展示jsFiddle什么是错的?对我来说有点不清楚。
- 在
tooltip.formatter
中检查this.x
并返回false
不应该显示工具提示。
- 那么,您可以设置这些选项,但它不会执行任何操作。
您的图片与 2)
该垂直线,只需禁用 tooltip.crosshairs
。
要更改点的顺序,您需要使用 tooltip.formatter
- 排序点降序并返回格式器字符串。
参考文献:
I could explain better if you can focus on the image attached here:
Can the hover line height be shown only up to the max line height (Please see the image below)
I do not want to show the hover values for first and last week. (I mean on hover of 'week 0', I do not want to show the hover boxes, same as for 'week 7')
Can I set the floor and ceiling for the each series data, Some thing like
series: [{ name: 'CPM', data: [5,524,4,1,4,1,3,20,3], color: 'rgb(87, 188, 0)' //floor: 5, //ceiling: 524, },{ ....} }]
Is there any such floor/min and max/ceil for the each data set.
Such that the other two series data gets visible in the chart. please refer this fiddle
How to show All Data Series Fiddle jsfiddle.net/4vzEt/21/
Please bare with me, I could not able to give fiddles as link, as it is not allowing. Please Help me, In achieving these points.
- Could you show jsFiddle what is wrong? It's a little not clear for me.
- In
tooltip.formatter
checkthis.x
and returnfalse
when tooltip shouldn't be displayed. - Well, you can set that options, but it won't do anything.
Your image is saying something really different than 2)
.. to remove that vertical line, just disable tooltip.crosshairs
.
To change order of points, you need to use tooltip.formatter
- sort points descending and return formatter string.
References:
这篇关于Highcharts根据数据系列值自定义显示工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!