3

I'm using primefaces 5.2 latest version and tried for line chart, it's working fine.

Am trying to change the line chart axes color,background,border, etc. but extender attribute is not working in latest primefaces version.

My XHTML:

 <p:chart type="line" model="#{chartViewLine.lineModel1}" styleClass="legendpos" extender="chartExtender" style="height:300px; width:570px;"/>

JAVASCRIPT:

function chartExtender() {        
    this.cfg.grid = {             
    background: 'transparent',
    gridLineColor: '#303030',
    drawBorder: false,
};

Is any alternative for 'extender' attribute OR my code have any wrong syntax?

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
user3114967
  • 639
  • 5
  • 15
  • 38

1 Answers1

10

You should now set your extender from your model in your chartViewLine bean.

LineChartModel model = new LineChartModel();
model.setExtender("chartExtender");

Attribute extender has been removed in PrimeFaces 5.0 (see also list of p:chart attributes from PrimeFaces 5.0 Documentation)

Mathieu Castets
  • 5,861
  • 3
  • 28
  • 37
  • Please file an issue in the PrimeFaces issue list. I personally still think this is an omission. You should be able to set the extender part from the view. – Kukeltje Jun 04 '15 at 14:15
  • What about version 6.1 there is no extender. – aysegulP Jun 18 '19 at 10:43