Adding dollar($) sign to X-axis lables(values) for bar charts in pentaho CDE

Posted on by By Nikhilesh, in Business Intelligence, Data Visualization, Open Source Business Intelligence, Pentaho | 0

Hi Guys,
Using below java script one can easily add ‘$’ sign to the values of X-axis for any charts in pentaho CDE.

Example:
function f(v) { return “$” + sprintf(‘%d’, v/1000) + ‘k’; }

Write the java code in “orthoAxisTickFormatter” java script wizard.

Make sure to give orthoAxisTicks as “True”
Sample output:


NOTE:
This code works with 13.06 as well with 13.09 version of pentaho CDE.

Also note that in java script if one line is not executing then the remaining lines will not execute. i.e., for instance you have 10 lines of code and 4th line is not executed then the remaining lines will not execute. Check with an alert function.

Sadakar Pochampalli
BI developer

 

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments