1. Chris Leonello
  2. jqplot
Issue #524 resolved

seriesToggle fails when used with EnhancedLegendRenderer

Anonymous created an issue

EnhancedLegendRenderer uses the following to toggle series on/off:

{{{ if (s.canvas._elem.is(':hidden') || !s.show) { plot.legend._elem.find('tr').eq(sidx).children().addClass('jqplot-series-hidden'); } else { plot.legend._elem.find('tr').eq(sidx).children().removeClass('jqplot-series-hidden'); } }}}

This is incorrect, because the EnancedLegendRenderer puts multiple series swatches/labels in one <tr>. This causes all of the series swatches/labels to toggle the strikethrough style when the first series in the legend line/<tr> is clicked. If any other series in the line/<tr> is clicked then the series is hidden on the chart but no strikethrough style is applied.