Skip to content

xdev-software/chartjs-java-model

Repository files navigation

Latest version Build ChartJS Documentation

chartjs-java-model

Provides Java models for Chart.js so that e.g. a Java Server can build a chart and then instruct a JavaScript client what needs to be shown.

This repo extends the abandoned Chart.java and adds support for Chart.js Version 4+.

Note

We try our best to implement the ChartJS v4 API however there are a lot of configuration options.
Therefore some parts might still be missing or use the outdated v2 API from the original repo.
If you think you found a missing or incorrect API please open an issue and/or provide a pull request.

Usage

Configuring a chart is straight forward and follows a builder like pattern:

new BarChart(new BarData()
  .addLabels("A", "B")
  .addDataset(new BarDataset()
    .setLabel("X")
    .addData(1)
    .addData(2)))
  .toJson(); // Do something with the json like sending it to the client

If you need more examples:

  • Have a look at the demo
  • or checkout how we do it in our tests

Installation

Installation guide for the latest release

Compatibility with Chart.js

Chart.js chartjs-java-model version
4.x 1+

Integrations

Support

If you need support as soon as possible and you can't wait for any pull request, feel free to use our support.

Contributing

See the contributing guide for detailed instructions on how to get started with our project.

Dependencies and Licenses

View the license of the current project or the summary including all dependencies

Acknowledgment

Disclaimer: This is not an official Chart.js product and not associated

About

Provides Java models for Chart.js

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 10

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy