0

Demonstration image For the stockchart, I'm calculating the rainfall data. For that my max, min, avg is fixed but the Rainfall data changes in hover of the graph by tooltip. I want all other information to be static and always shown and the rainfall being updated on hover over the graph.

Currently I'm mapping it to this.points.map(function(point) but it all the information shows only on hover.

Sunny
  • 235
  • 4
  • 17
  • Hi @Pratyush Garg, Could you provide us with your chart configuration object with some sample data? – ppotaczek Jun 13 '19 at 10:11
  • Hi @ppotaczek, I have edited with my chart configuration. – Sunny Jun 13 '19 at 12:25
  • Pratyush Garg - I mean your chart configuration object as a JS code. Do you want to show the values outside the chart, something like this: http://jsfiddle.net/BlackLabel/w946kjt5/ ? – ppotaczek Jun 13 '19 at 13:58
  • @ppotaczek I want them to be shown on the chart, just like the header and labels of tooltip, but to be displayed even after the cursor moves out of hovering area – Sunny Jun 13 '19 at 19:53
  • Pratyush Garg - So, do you want to have always visible tooltip? Example: http://jsfiddle.net/BlackLabel/s4tvjhwL/ – ppotaczek Jun 14 '19 at 09:02
  • @ppotaczek Thanks this solved the issue. – Sunny Jun 17 '19 at 10:42

1 Answers1

0

For the tooltip to always be visible in your case, overwrite:

  • hide from Tooltip.prototype
  • hideCrosshair from Axis.prototype

Highcharts.Tooltip.prototype.hide = function() {};
Highcharts.Axis.prototype.hideCrosshair = function() {};

Live demo: http://jsfiddle.net/BlackLabel/kfpLyvo4/

Docs: https://www.highcharts.com/docs/extending-highcharts

ppotaczek
  • 36,341
  • 2
  • 14
  • 24