What is the alternative for the Chart Expander Attribute in PrimeFaces 5.2?
I am using Primefaces 5.2 latest version and tried on graph, it works fine.
I'm trying to change the color of the line chart axes, background, border, etc., but the extender attribute doesn't work in the latest version of plain faces.
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 there an alternative to the extender attribute OR my code has the wrong syntax?
+3
source to share
1 answer
You should now set your expander from your model to the chartViewLine
bean.
LineChartModel model = new LineChartModel();
model.setExtender("chartExtender");
The attribute extender
was removed in PrimeFaces 5.0 (see also the list of attributes p:chart
from PrimeFaces 5.0 documentation )
+10
source to share