1. Chris Leonello
  2. jqplot
Issue #755 new

EnhancedLegendRenderer Bug and Fix

created an issue

Ive been getting "TypeError: this.legend._elem is undefined" when using jqplot.enhancedLegendRenderer.js. The error occurs on line 301 and may be fixed by adding a check for existance in the conditional on line 300.

if (this.legend.renderer.constructor == $.jqplot.EnhancedLegendRenderer && this.legend.seriesToggle){


if (this.legend.renderer.constructor == $.jqplot.EnhancedLegendRenderer && this.legend.seriesToggle && this.legend._elem){

Comments (3)

  1. Kevin Fernandes

    I can repeat this issue in Chrome. If legend.show is set to false then legend._elem is null. I have not tried this with a different browser so I cannot confirm otherwise.

    I can confirm the suggested fix above does indeed work.

  2. Log in to comment