Highcharts Custom display of tooltips, based on da

2019-01-20 04:54发布

问题:

I could explain better if you can focus on the image attached here:

  1. Can the hover line height be shown only up to the max line height (Please see the image below)

  2. 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')

  3. 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.

回答1:

  1. Could you show jsFiddle what is wrong? It's a little not clear for me.
  2. In tooltip.formatter check this.x and return false when tooltip shouldn't be displayed.
  3. 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:

  • tooltip.formatter
  • tooltip.crosshairs