Available in versions: Dev (3.21) | Latest (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
Exporting Charts
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
// Count books per book store and format them as charts
String chart =
create.select(
BOOK_TO_BOOK_STORE.BOOK_STORE_NAME,
count(BOOK_TO_BOOK_STORE.BOOK_ID).as("books")
)
.from(BOOK_TO_BOOK_STORE)
.groupBy(BOOK_TO_BOOK_STORE.BOOK_STORE_NAME)
.fetch()
.formatChart();
When formatted, the result is this:
+-------------------------+-----+ |BOOK_STORE_NAME |books| +-------------------------+-----+ |Buchhandlung im Volkshaus| 1| |Ex Libris | 2| |Orell Füssli | 3| +-------------------------+-----+
And the chart will be looking like the following one
3.00| █████████████████████████
2.91| █████████████████████████
2.82| █████████████████████████
2.73| █████████████████████████
2.64| █████████████████████████
2.55| █████████████████████████
2.45| █████████████████████████
2.36| █████████████████████████
2.27| █████████████████████████
2.18| █████████████████████████
2.09| █████████████████████████
2.00| ██████████████████████████████████████████████████
1.91| ██████████████████████████████████████████████████
1.82| ██████████████████████████████████████████████████
1.73| ██████████████████████████████████████████████████
1.64| ██████████████████████████████████████████████████
1.55| ██████████████████████████████████████████████████
1.45| ██████████████████████████████████████████████████
1.36| ██████████████████████████████████████████████████
1.27| ██████████████████████████████████████████████████
1.18| ██████████████████████████████████████████████████
1.09| ██████████████████████████████████████████████████
1.00|███████████████████████████████████████████████████████████████████████████
----+---------------------------------------------------------------------------
| Buchhandlung im Volkshaus Ex Libris Orell Füssli
It is possible to specify a variety of org.jooq.ChartFormat formatting specifications, such as the width, height, display type (default, stacked, 100% stacked), the column index of the category and value columns, etc.
Feedback
Do you have any feedback about this page? We'd love to hear it!