Skip to content
Java library for use with Chart.js javascript library
Branch: master
Clone or download
Latest commit a684b13 Nov 1, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix javadoc errors Nov 1, 2018
.gitignore Remove executable bit from files that don't need it Oct 24, 2017
LICENSE.txt Merge pull request #8 from benmccann/rm-executable Aug 25, 2018
changelog Document change and contributor Nov 1, 2018

Maven Central badge Javadocs License enables integration with the excellent Chart.js library from within a Java application.

Usage example

In Java:

BarDataset dataset = new BarDataset()
		.setLabel("sample chart")
		.setData(65, 59, 80, 81, 56, 55, 40)
		.addBackgroundColors(Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW, Color.ORANGE, Color.GRAY, Color.BLACK)

BarData data = new BarData()
		.addLabels("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")

return new BarChart(data).toJson();

In JavaScript:

var ctx = document.getElementById('canvasId'));
new Chart(ctx, json);


1.x 0.9.x
2.x 2.x


See example charts by running the included unit tests:

mvn clean compile test


Browse this project's javadoc at

Maven Central

Include this project directly from Maven Central



Downloads for this project at Maven Central.

Other resources

The docs for Chart.js are a helpful source of info on what's possible and how to achieve it.

GnuPG public key

Verify signature files with my GnuPG public key.

License is licensed under the Apache 2.0 license.

You can’t perform that action at this time.