0

I am trying to plot three time-series data from csv in a single chart using highcharts. Before plotting the data I am normalizing the data so that all the three data sources plot data which can be easily compared for a given range.

But when I use the tooltip I want to show what the original value of the data is in the tooltip on hover.

I looked at the tooltip formatter but could not get through for changing the value for only one of the data series.

shoghi07
  • 33
  • 1
  • 13
  • just to confirm, you want to display something extra for one of the series out of three? – Rahul Sharma Apr 18 '16 at 09:08
  • @RahulSharma, I want to show the data that is normalized and added to the chart along with what the original value was. So it is 2 values where one is from the data array and one i want to calculate and show it in the tooltip. – shoghi07 Apr 18 '16 at 09:11
  • 3
    so what you can do is, set the one you want to be used to plot the chart as 'y' for the point and for the original value, create a custom property, let's say 'originalValue'. Then in your tooltip formatter you can just use this property to display the original value. – Rahul Sharma Apr 18 '16 at 09:15
  • 1
    Extending @Rahul Sharma answer, in the each point you can define custom fields like originalValue, which are available in the tooltip.formatter in this.options.originalValue field. – Sebastian Bochan Apr 18 '16 at 09:49
  • Can you share some demo code? – apokryfos Apr 18 '16 at 11:49
  • This answer here may be helpful for you for setting custom properties: http://stackoverflow.com/questions/8752141/add-additional-data-to-a-highcharts-series-for-use-in-formatters – Mike Zavarello Apr 18 '16 at 12:32

0 Answers0