css - Remove grid and border from p:chart barchart -
i trying remove grid , border in barchart of primefaces. please think new charts of primefaces. googled lot , have found solutions old tags of primefaces there new ones.
<p:chart type="bar" model="#{reportservercontroller.horizontalbarmodelg}" styleclass="chartsize" > <p:ajax event="itemselect" listener="#{auftragbean.itemselectgutachten}" update="datatableg" /> </p:chart>
so there possibility remove border , grid chart?
to extend jqplot configuration have use extender functionality of primefaces' chart.
in controller have set model property extender. example using primefaces showcase demo:
private barchartmodel initbarmodel() { barchartmodel model = new barchartmodel(); model.setextender("chartextender"); chartseries boys = new chartseries(); boys.setlabel("boys"); boys.set("2004", 120); boys.set("2005", 100); boys.set("2006", 44); boys.set("2007", 150); boys.set("2008", 25); chartseries girls = new chartseries(); girls.setlabel("girls"); girls.set("2004", 52); girls.set("2005", 60); girls.set("2006", 110); girls.set("2007", 135); girls.set("2008", 120); model.addseries(boys); model.addseries(girls); return model; }
the setextender methos accept name of javascript function in can manipulate jqplot configuration.
for example, remove grid lines can following:
<h:outputscript> function chartextender(){ //this = chart widget instance //this.cfg = options this.cfg.axes.xaxis.tickoptions.showgridline = false; this.cfg.axes.yaxis.tickoptions.showgridline = false; } </h:outputscript>
you can see here jqplot options
Comments
Post a Comment