jqplot CategoryAxisRenderer highlighter wrong tooltip output

744 views
Skip to first unread message

vru

unread,
Feb 7, 2014, 8:33:20 AM2/7/14
to jqplot...@googlegroups.com
Hello,

I am using jqplot 1.0.8 and experience problems with the CategoryAxisRenderer. The y-axis displays numeric values and the x-axis displays either numeric values or string values. That is why I chose theCategoryAxisRenderer. Basically, everything is rendered correctly except for the highlighter. If I hover over a point, I do not get the value for the x-axis, but instead, I get only the index of the value.

The problem is further described at stackoverflow.

Thank you in advice!

Alan Legroux

unread,
Feb 7, 2014, 11:34:00 AM2/7/14
to jqplot...@googlegroups.com

vru

unread,
Feb 7, 2014, 12:25:47 PM2/7/14
to jqplot...@googlegroups.com
I've already tested the file mentioned in the post, but the result stays the same. Is there any other way to solve this bug? Or should I provide more data for better understanding?

Alan Legroux

unread,
Feb 7, 2014, 12:44:17 PM2/7/14
to jqplot...@googlegroups.com
This is an example for how I customize the highlighted points, with this file. Hope this helps :
highlighter: {
            show : true,
        tooltipLocation : 'n',
        fadeTooltip : true,
        useAxesFormatters:false,
        formatString: '%s, %d',
            tooltipFormatCallback: function(x, y, x_label, seriesIndex){
            switch (seriesIndex) {
            case 0:
                return "Total : " + y;
break;
            case 1:
                return "Victoires : " + y;
break;
            case 2:
                return "Défaites : " + y;
break;
            }
            }
          }



Le vendredi 7 février 2014 14:33:20 UTC+1, vru a écrit :
jqplot.highlighter.js
Message has been deleted
Message has been deleted

vru

unread,
Feb 7, 2014, 1:54:52 PM2/7/14
to jqplot...@googlegroups.com
Thank you very much, the variable "x_label" holds the value I want!


Am Freitag, 7. Februar 2014 14:33:20 UTC+1 schrieb vru:

Alan Legroux

unread,
Feb 7, 2014, 2:24:08 PM2/7/14
to jqplot...@googlegroups.com
Great !


Le vendredi 7 février 2014 14:33:20 UTC+1, vru a écrit :
Reply all
Reply to author
Forward
0 new messages