1. zeratul2099
  2. jqplot

Commits

zeratul2099  committed 69002dc

Added showMarkerStyle option to enhancedLegendRenderer

  • Participants
  • Parent commits 868f43d
  • Branches default

Comments (0)

Files changed (1)

File src/plugins/jqplot.enhancedLegendRenderer.js

View file
         // prop: showLineStyle
         // true to draw the correct lineStyle and lineWidth in the legends' swatch, not only a colored box.
         this.showLineStyle = false;
+        // prop: showMarkerStyle
+        // true to draw the correct markerStyle in the legends' swatch, not only a colored box. Only used if showLineStyle is true, too.
+        this.showMarkerStyle = false;
         $.extend(true, this, options);
         
         if (this.seriesToggle) {
                                 pat.lineTo(31,8);
                                 pat.closePath();
                                 ctx.stroke();
+                                if (this.showMarkerStyle && s.markerRenderer) {
+                                    s.markerRenderer.draw(8, 8, ctx, s.markerOptions);
+                                }
                                 td1.append(canvas0);
                             } else {
                                 div0 = $(document.createElement('div'));