File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,27 @@ This repo extends the abandoned [Chart.java](https://github.com/mdewilde/chart)
10
10
11
11
> [ !NOTE]
12
12
> We try our best to implement the ChartJS v4 API however there are a lot of configuration options.<br />
13
- > Therefore some parts migth still be missing or use the outdated v2 API from the original repo.<br />
13
+ > Therefore some parts might still be missing or use the outdated v2 API from the original repo.<br />
14
14
> If you think you found a missing or incorrect API please open an issue and/or provide a pull request.
15
15
16
+ ## Usage
17
+
18
+ Configuring a chart is straight forward and follows a builder like pattern:
19
+ ``` java
20
+ new BarChart (new BarData ()
21
+ .addLabels(" A" , " B" )
22
+ .addDataset(new BarDataset ()
23
+ .setLabel(" X" )
24
+ .addData(1 )
25
+ .addData(2 )))
26
+ .toJson(); // Do something with the json like sending it to the client
27
+ ```
28
+
29
+ If you need more examples:
30
+ * Have a look at the [ demo] ( ./chartjs-java-model-demo/ )
31
+ * or checkout how we do it in our [ tests] ( ./chartjs-java-model/src/test/java/software/xdev/chartjs/model/ )
32
+ * there are also [ screenshots] ( ./chartjs-java-model/src/test/resources/screenshotReferences/ ) available
33
+
16
34
## Installation
17
35
[ Installation guide for the latest release] ( https://github.com/xdev-software/chartjs-java-model/releases/latest#Installation )
18
36
You can’t perform that action at this time.
0 commit comments