Skip to content

Commit 2e964e0

Browse files
committed
Update README.md
1 parent 2a486fd commit 2e964e0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ chart.showChart(new BarChart(new BarData()
3636

3737
### Recommended
3838

39-
Recommended actions:
4039
1. Use a Java model of Java model of Chart.js's configuration, like [XDEV's chartjs-java-model](https://github.com/xdev-software/chartjs-java-model).<br/>
4140
Otherwise you have to write the JSON yourself.
4241
2. Optionally derive classes for your charts (from e.g. ``ChartContainer``) that also handle the data-to-JSON conversion logic.<br/>
4342
Therefore you can encapsulate the components properly, for example like this: ``FetchFromBackendService.class → Model for chart → ChartContainer.class → Build JSON and show chart``
4443

45-
How the code could look:
44+
<details><summary>Here is a example how the code could look (click to expand)</summary>
45+
4646
1. Define a custom chart or use the ``showChart``-method directly.<br/>Example:
4747
```java
4848
public class ExampleChartContainer extends ChartContainer
@@ -93,6 +93,8 @@ How the code could look:
9393
}
9494
```
9595

96+
</details>
97+
9698
## Installation
9799
[Installation guide for the latest release](https://github.com/xdev-software/vaadin-chartjs-wrapper/releases/latest#Installation)
98100

0 commit comments

Comments
 (0)