jsf - Primefaces: Charts and Legend position -


i'm working on putting pretty basic stacked bar chart using primefaces. chart seems build fine. however, legend being placed on chart data. know can move legend compass ordinal (n, s, w, e, se, sw, ne, nw), i'd move off data.

the code in:

 <p:barchart id="stackedkwh" value="#{kwhsalesbeanmanager.kwhsaleschart}" legendposition="e" style="height:300px;width:800px" title="kwh sales type" stacked="true" barmargin="10" min="0" max="125000000" /> 

and looks like. move legend off chart right.

here's looks when set 'e':

try add :

function extlegend()  {     this.cfg.legend= {         show: true,         location: 's',         placement: 'outsidegrid'     }; } 

and add inside barchart component :

 extender="extlegend" 

Comments

Popular posts from this blog

visual studio - vb.net filter binding source by time -

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -