Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Pentaho CTools

You're reading from  Learning Pentaho CTools

Product type Book
Published in May 2016
Publisher Packt
ISBN-13 9781785283420
Pages 388 pages
Edition 1st Edition
Languages
Author (1):
Miguel Gaspar Miguel Gaspar
Profile icon Miguel Gaspar

Table of Contents (17) Chapters

Learning Pentaho CTools
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with CTools 2. Acquiring Data with CDA 3. Building the Dashboard Using CDF 4. Leverage the Process with CDE 5. Applying Filters to the Dashboard 6. Tables, Templates, Exports, and Text Components 7. Advanced Concepts Using CDF and CDE 8. Visualizations Using CCC 9. Pentaho App Builder 10. Embed, Deploy, and Debug Index

Dashboards utilities


There was once a time when we needed to add libraries as external resources to leverage the process of formatting dates and numbers. Nowadays, it is possible to do the formatting without the need to include external files. We can do the formatting just by including the cfd/dashboard/Utils module. This will make require load all the dependencies without any more effort.

Formatting numbers

Numbers can be formatted to look like currency, percentages with decimal places, thousands, and abbreviations. To format numbers, you should use the function numberFormat, available in the dashboard object. In our examples, you could do this by calling Utils.numberFormat(value[, format[, langCode]]). The function accepts the arguments; the first one is the value to format, the second one is the format mask, and the last is the language and locale to use when formatting the number.

The mask or format argument is a string made up of symbols that shows how to format the number. The most commonly...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}