I'm using Primefaces 5.3 and trying to allow the user to toggle series on and off by clicking the corresponding legend item.

Because primefaces 5.3 does not include `EnhancedPieLegendRenderer` in the `jqplot.txt` I added it manually in resources/js and imported it into my project. The code for my extender is in a file called `charts.js` in the same directory.

In my .xhtml file I bring in the files like so

```
 <ui:composition template="/templates/template.xhtml">
   <ui:define name="body">
    <h:outputScript name="js/jqplot.pieRenderer.js"/>
    <h:outputScript name="js/extendedPieRenderer.js"/>
    <h:outputScript name="js/jqplot.enhancedPieLegendRenderer.js"/>
    <h:outputScript name="js/charts.js"/>

```

the xhtml for the piechart itself looks like

```
<p:chart id="outboundLanChart" 
         type="pie" 
         model="#{foo.bar}"/>

```

There's nothing special about the underlying `PieChartModel` object or the backing bean and everything renders fine. In the init method which gets invoked when the user navigates to the page I set the extender of the object `bar.setExtender("extnd");`

In charts.js I have

```
function extnd() {

  this.cfg.seriesDefaults = {
    renderer: $.jqplot.PieRenderer
  }

  this.cfg.legend = {
    renderer: $.jqplot.EnhancedPieLegendRenderer,
    show: true,
    rendererOptions: {
        seriesToggle: 'normal',
        seriesToggleReplot: true
    }
  }

```

}

I know that the extender is working because I have a highlighter configuration that works exactly as I'd expect (I didn't include that piece of code because it's not relevant to the question). A `console.log` inspection of `this.cfg.legend` shows that it's not using `EnhancedPieLegendRenderer` for the `legend.renderer` property. So far searching google, StackOverflow, the primefaces forums and all sorts of documentation and source code hasn't yielded any good results. **Is it possible to get primefaces to use the EnhancedPieLegendRenderer or is there another, more proper, Primefaces way of allowing the user to toggle a series on or in a pie chart?**

UPDATE: At Kukeltje's suggestion I included the `pieRenderer` and `extendedPieRenderer` plugins and updated my js code accordingly. It might have been a problem but it wasn't the problem and the issue still persists.