Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble getting unique tooltip based on X axis values in highcharts line graph
    primarykey
    data
    text
    <p>I'm trying to make a graph in which points having different x axis values have different tooltip .The 1st two points of a series have the same tooltip even though their x axis values are different.i.e points under the month of jan should have "11st comment" tooltip,points under Feb should have "22nd comment" tooltip so on and so forth even if their x axis values are same but not y axis values..</p> <p>The current computational logic is that the tooltip depends upon the y axis values.As long as y axis values are changing the tool tip changes accordingly.This happens because of the statement"this.y" in the below code..</p> <p>The problem with this logic is that as long as y axis values are distinct the tooltip works properly,the moment 2 consecutive points of a series have same y axis values the tooltip does not change when their x values are different... </p> <p>To make the tooltip change acoording to x axis values I am replacing "this.y" with "this.x" but the desired change is not happening.Can you please tell me how to make that change?</p> <p>The tool tip code..</p> <pre><code> tooltip: { formatter: function () { var serieI = this.series.index; var index = dataValues.indexOf(this.y); var index1= dataValues2.indexOf(this.y); debugger; var comment = ""; if (serieI == 0) { comment = $("#ppForm.textarea:eq(" + (index) + ")").val(); } else { //comment = "second serie matched!"; comment = $("#ppForm.textarea:eq(" + (index1) + ")").val(); } /*return ''+ this.x + '&lt;/b&gt; is &lt;b&gt;' + this.y + '&lt;/b&gt; --&gt;' + comment;*/ return '--&gt;'+comment; } } </code></pre> <p>The js fiddle is... <a href="http://jsfiddle.net/RbenU/25/" rel="nofollow">http://jsfiddle.net/RbenU/25/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload