Commits

Chris Leonello  committed 248de43

Additions to add class on hidden series legend rows.

  • Participants
  • Parent commits afbf117

Comments (0)

Files changed (2)

File src/jquery.jqplot.css

 }
 
 .jqplot-table-legend .jqplot-series-hidden {
-    background-color: lightgray;
+    text-decoration: line-through;
 }
 
 div.jqplot-table-legend-swatch-outline {

File src/plugins/jqplot.enhancedLegendRenderer.js

                                     }
                                 } 
                                 if (this.showSwatches) {
-                                    td1.bind('click', {series:s, speed:speed}, s.toggleDisplay);
+                                    td1.bind('click', {series:s, speed:speed}, handleToggle);
                                     td1.addClass('jqplot-seriesToggle');
                                 }
                                 if (this.showLabels)  {
-                                    td2.bind('click', {series:s, speed:speed}, s.toggleDisplay);
+                                    td2.bind('click', {series:s, speed:speed}, handleToggle);
                                     td2.addClass('jqplot-seriesToggle');
                                 }
                             }
     var handleToggle = function (ev) {
         ev.data.series.toggleDisplay(ev);
         if (ev.data.series.canvas._elem.hasClass('jqplot-series-hidden')) {
-            console.log('add');
             $(this).parent().addClass('jqplot-series-hidden');
         }
         else {
-            console.log('remove');
             $(this).parent().removeClass('jqplot-series-hidden');
         }
     };