|
1 | | -# cutecharts-fun.java |
2 | | -:paint: A handle style Chart lib in Java (funtional). |
| 1 | +<p align="center"> |
| 2 | + <img src="https://user-images.githubusercontent.com/19553554/66697551-27384b00-ed09-11e9-9fe8-210918fdeb77.png" alt="cutecharts.java logo" width=600/> |
| 3 | +</p> |
| 4 | + |
| 5 | +<p align=center> |
| 6 | + <i>🎨A hand drawing style charts library in functional Java.</i> |
| 7 | +</p> |
| 8 | + |
| 9 | +## 📣 Description |
| 10 | + |
| 11 | +This is a `functional` version of [cutecharts.java](https://github.com/cutecharts/cutecharts.java) which I want try to write `Java` on `non-Java`. :dog: |
| 12 | + |
| 13 | +Definitely, It is more fun to make something has more possibilities. |
| 14 | + |
| 15 | + |
| 16 | +## 🔖 Documentation |
| 17 | + |
| 18 | +> All the configurations detail you can find on there [chart.xkcd](https://timqian.com/chart.xkcd/). |
| 19 | +
|
| 20 | +<img src=https://user-images.githubusercontent.com/33706142/77919719-1e93fb00-72d0-11ea-8116-e2aa4a89d64a.png /> |
| 21 | + |
| 22 | +## 📝 Useage |
| 23 | + |
| 24 | +> Using the `Functional` stuff, it should be `JDK8` at least. |
| 25 | +
|
| 26 | +### Import Dependency |
| 27 | +> Maven |
| 28 | +```xml |
| 29 | +<dependency> |
| 30 | + <groupId>com.koy</groupId> |
| 31 | + <artifactId>cutecharts-func</artifactId> |
| 32 | + <version>1.0.0</version> |
| 33 | +</dependency> |
| 34 | +``` |
| 35 | + |
| 36 | +> Gradle |
| 37 | +
|
| 38 | +```shell |
| 39 | +compile group: 'com.koy', name: 'cutecharts-func', version: '1.0.0' |
| 40 | +``` |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +### Code Demo |
| 45 | + |
| 46 | +```java |
| 47 | + Chart line = Chart.newChart(ChartType.LINE) |
| 48 | + .setGlobalOptions( |
| 49 | + GlobalOptions.setTitle("Demo-Line"), |
| 50 | + GlobalOptions.setXLabel("X-axis Week"), |
| 51 | + GlobalOptions.setYLabel("Y-axis Amount") |
| 52 | + ).setSeriesOptions( |
| 53 | + SeriesOptions.setBackgroundColor("orange") |
| 54 | + ) |
| 55 | + .setDataLabels(1, 2, 3, 4, 5, 6, 7) |
| 56 | + .setDataSeriesOptions( |
| 57 | + DataSet.addDataSet("Beer", 1, 2, 3, 4, 2, 5, 4), |
| 58 | + DataSet.addDataSet("Juice", 1, 4, 7, 4, 1, 3, 2) |
| 59 | + ) |
| 60 | + .build(); |
| 61 | + |
| 62 | + RenderExecutor.renderToPath("./").accept(line); |
| 63 | +``` |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +## 📃 License |
| 69 | + |
| 70 | +MIT [©Koy](https://github.com/Koooooo-7) |
| 71 | + |
0 commit comments