Format chart values

51 views
Skip to first unread message

vgar...@gmail.com

unread,
Aug 15, 2016, 4:01:45 PM8/15/16
to pivot4j-list
Is it possible to format the values shown in a pie and bar charts? For example: R$ 123,45 instead of 123.45
Tnx.

Xavier Cho

unread,
Aug 16, 2016, 8:50:06 PM8/16/16
to pivot4j-list, vgar...@gmail.com
It's possible, but requires a bit of source level modfications. PrimeFaces API provides the mentioned functionality via Axis.setTickFormat, and you can reference Axis instances by overriding BarChartBuilder.createModel for instance.

There are multiple ways to achieve this, but the important part is obtaining a reference to the chart model somewhere and modifying its axes configuration before it's returned to the JSF side.

Please let me know if you need further help.

Cheers,
Xavier

2016년 8월 16일 화요일 오전 5시 1분 45초 UTC+9, vgar...@gmail.com 님의 말:
Reply all
Reply to author
Forward
0 new messages