Issue #631 new

Highlighter doesn't toggle when series toggle on legend - Version: 1.0.0b2_r1012

Anonymous created an issue

Bug use case: enhancedLegendRenderer is enabled. Highlighter is enabled. User clicks at one series on legend. Series hide, but when user hovers over the hidden series, it highlights, but it shouldn't.

Proposed solution: Add lines {{{

!javascript

ev.data.series.showHighlight = false; }}} and {{{

!javascript

ev.data.series.showHighlight = true; }}} at line 219, so the function //handleToggle// looks like this: {{{

!javascript

var handleToggle = function (ev) { ev.data.series.toggleDisplay(ev); if (ev.data.series.canvas._elem.hasClass('jqplot-series-hidden')) { $(this).addClass('jqplot-series-hidden'); $(this).next('.jqplot-table-legend-label').addClass('jqplot-series-hidden'); $(this).prev('.jqplot-table-legend-swatch').addClass('jqplot-series-hidden'); ev.data.series.showHighlight = false; } else { $(this).removeClass('jqplot-series-hidden'); $(this).next('.jqplot-table-legend-label').removeClass('jqplot-series-hidden'); $(this).prev('.jqplot-table-legend-swatch').removeClass('jqplot-series-hidden'); ev.data.series.showHighlight = true; } }; }}}

Comments (7)

  1. Audrius Kažukauskas

    (BitBucket's issue tracker UI flow really sucks... Can't even comment and attach files at the same time.)

    I can reproduce this with latest version of jqPlot when barRenderer is enabled. Attached are the patches which I used to fix both barRenderer bar highlighting and highlighter tooltip showing, although being unfamiliar with jqPlot source I am not sure if it's the best way to fix this.

  2. Paul Pritchard

    It's not clear whether this is resolved or not per the comment stream. If there is still a problem with the latest version, please create a jsfiddle to demonstrate the problem.

  3. Audrius Kažukauskas

    No, this is still not resolved, here's a jsfiddle that demonstrates the problem: http://jsfiddle.net/FYAgH/

    Sorry for the crappy looks, this is probably due to wrong MIME type of CSS file returned by BitBucket.

    To reproduce, turn off one of the series in the legend. The bars of the series will disappear, but if you hover the mouse cursor over the areas where they were, you'll see a bar highlighting and a tooltip show up.

    The patches attached to this issue solve the problem and still apply cleanly to the latest version of jqPlot. If you're OK with them, I can prepare a pull request.

  4. Log in to comment