初始化
95
README.md
@@ -1,72 +1,44 @@
|
|||||||
<div align="center">
|
|
||||||
<img src="assets/imgs/logo.png" alt="logo" width=150 height=150 />
|
|
||||||
</div>
|
|
||||||
<h1 align="center">ECharts Java</h1>
|
|
||||||
<p align="center">
|
|
||||||
<em>"We bring better visualization into Java with ECharts"</em>
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/ECharts-Java/ECharts-Java/actions">
|
|
||||||
<img src="https://github.com/ECharts-Java/ECharts-Java/actions/workflows/maven.yml/badge.svg" alt="Github Actions Status">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/pyecharts/pyecharts/pulls">
|
|
||||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="Contributions welcome">
|
|
||||||
</a>
|
|
||||||
<!-- <a href="https://codecov.io/gh/ECharts-Java/ECharts-Java">
|
|
||||||
<img src="https://codecov.io/gh/ECharts-Java/ECharts-Java/branch/dev/graph/badge.svg?token=V1N6AQ0EA1"/>
|
|
||||||
</a> -->
|
|
||||||
<a href="https://opensource.org/licenses/Apache-2.0">
|
|
||||||
<img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License">
|
|
||||||
</a>
|
|
||||||
<a href="https://maven-badges.herokuapp.com/maven-central/org.icepear.echarts/echarts-java">
|
|
||||||
<img src="https://maven-badges.herokuapp.com/maven-central/org.icepear.echarts/echarts-java/badge.svg" alt="Maven Central">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
[中文 README](README.zh.md)
|
|
||||||
|
|
||||||
[Official Documentation](https://echarts.icepear.org/#/)
|
## 📙 简介
|
||||||
## 📙 Introduction
|
|
||||||
|
|
||||||
ECharts Java is a lightweight but comprehensive library for Java developers to easily use JavaScript visualization library [Apache ECharts](https://echarts.apache.org/en/index.html). The simple chart mode facilitates users to write visualization fast and easily, empowered by the clean APIs provided by ECharts Java. The advanced mode helps create an `Option` object and its Json representation in chainable Java codes, which includes almost all the features defined in [Apache ECharts](https://echarts.apache.org/en/index.html). Now ECharts Java supports Apache ECharts version 5.x.
|
ECharts Java 是一款基于 [Apache ECharts](https://echarts.apache.org/en/index.html) 的,简易但全面的数据可视化库。(现支持 Apache ECharts 5.x 版本)。
|
||||||
|
|
||||||
## 🌠 Features
|
论简易性,ECharts Java 重新设计了一系列和绘图有关的接口,使得绘图过程更加符合直觉和常理。同时,由于 Apache ECharts 的接口过于复杂和繁琐,我们在 ECharts Java 的图表 API 中简化了部分原本的接口设计。
|
||||||
|
|
||||||
- Simple, clean and organized APIs, supporting method chaining
|
论全面,ECharts Java 保留了 Apache ECharts “一切皆 Option”的设计理念。因此,除了重新设计的图表 API 以外,我们还保留了自定义 Option 对象的方法。用户可以从零开始,按照 ECharts 的 Option 文档,自定义任何 ECharts 支持的 Option。除此以外,我们还使用链式方法调用等方式,使得 Java 开发者在构建 Option 的过程中更加方便。
|
||||||
|
|
||||||
- Full coverage of [Apache ECharts](https://echarts.apache.org/en/index.html) functionalities
|
## 🌠 特性
|
||||||
|
|
||||||
- Easily integrate with Web Frameworks
|
- 简单、整洁、高度组织化的 API 接口,支持链式调用
|
||||||
|
- 完整保存 Apache ECharts 的功能
|
||||||
|
- 快速集成至当前流行的 Web 框架
|
||||||
|
- 灵活的导出格式,支持 HTML,PNG 和 JSON
|
||||||
|
- 完整、详细的文档和示例库
|
||||||
|
|
||||||
- Flexible export format, including HTML and images
|
## 🔬 安装
|
||||||
|
|
||||||
- Complete and detailed documentation and examples
|
Maven 项目:
|
||||||
|
|
||||||
## 🔬 Installation
|
|
||||||
|
|
||||||
For a Maven project, includes the following in your pom.xml
|
|
||||||
```xml
|
```xml
|
||||||
|
// pom.xml
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.icepear.echarts</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>echarts-java</artifactId>
|
<artifactId>echarts5-java</artifactId>
|
||||||
<version>1.0.7</version>
|
<version>0.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
For a Gradle Groovy project, includes
|
|
||||||
```
|
|
||||||
implementation 'org.icepear.echarts:echarts-java:1.0.7'
|
|
||||||
```
|
|
||||||
|
|
||||||
For more, refer to [here](https://search.maven.org/artifact/org.icepear.echarts/echarts-java/1.0.7/jar).
|
如果你使用的是其他项目,请参阅[这里](https://search.maven.org/artifact/org.icepear.echarts/echarts-java/1.0.7/jar)。
|
||||||
|
|
||||||
## 🔭 Usage
|
## 🔭 使用
|
||||||
|
|
||||||
### Generate Local HTML and Download Image
|
### 生成 HTML 和下载图片
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// All methods in EChart Java supports method chaining
|
// All methods in EChart Java supports method chaining
|
||||||
Bar bar = new Bar()
|
Bar bar = new Bar()
|
||||||
.setLegend()
|
.setLegend()
|
||||||
.setTooltip("item")
|
.setTooltip("item")
|
||||||
@@ -81,9 +53,10 @@ public static void main(String[] args) {
|
|||||||
engine.render("index.html", bar);
|
engine.render("index.html", bar);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<img src="assets/imgs/multibar-render.gif" alt="multi-bar-render" style="width:85%;" />
|
<img src="assets/imgs/multibar-render.gif" alt="multi-bar-render" style="width:85%;" />
|
||||||
|
|
||||||
### Generate Option Object and its JSON Representation
|
### 生成 Option 对象和对应的 JSON 结构
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@@ -101,7 +74,7 @@ public static void main(String[] args) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The output JSON object will be like the following,
|
生成的 JSON 对象如下:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -123,13 +96,13 @@ The output JSON object will be like the following,
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Integrate with Spring Web Application
|
### 集成至 Spring Boot 应用
|
||||||
|
|
||||||
<img src="assets/imgs/line-renderHtml.gif" alt="spring-boot-integration" style="width:75%;" />
|
<img src="assets/imgs/line-renderHtml.gif" alt="spring-boot-integration" style="width:75%;" />
|
||||||
|
|
||||||
For demo codes, please refer to the [docs](https://echarts.icepear.org/) and [example repo](https://github.com/incandescentxxc/ECharts-Java-Examples).
|
详细内容请参阅,[文档](https://echarts.icepear.org/#/zh-cn/) ,[代码仓库](https://github.com/incandescentxxc/ECharts-Java-Examples)。
|
||||||
|
|
||||||
## 🎇 Gallery
|
## 🎇 示例
|
||||||
|
|
||||||
<p float="center">
|
<p float="center">
|
||||||
<img src="assets/imgs/stacked-line.jpg" width="32%" />
|
<img src="assets/imgs/stacked-line.jpg" width="32%" />
|
||||||
@@ -156,17 +129,19 @@ For demo codes, please refer to the [docs](https://echarts.icepear.org/) and [ex
|
|||||||
<img src="assets/imgs/animation-gauge.jpg" width="32%" />
|
<img src="assets/imgs/animation-gauge.jpg" width="32%" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## 💡 Authors
|
## 💡 作者
|
||||||
|
|
||||||
- [@IcePear-Jzx](https://github.com/IcePear-Jzx)
|
- [@IcePear-Jzx](https://github.com/IcePear-Jzx)
|
||||||
- [@incandescentxxc](https://github.com/incandescentxxc)
|
- [@incandescentxxc](https://github.com/incandescentxxc)
|
||||||
|
|
||||||
Welcome more contribution in the community!
|
欢迎大家积极提 issue,fork,和其他贡献!
|
||||||
|
|
||||||
## 💌 Acknowledgement
|
## 💌 鸣谢
|
||||||
- This project is inspired by the Homework 6 of the course [Principles of Software Construction Objects, Design, and Concurrency](https://cmu-17-214.github.io/f2021/), Fall 2021, at [Carnegie Mellon University](https://www.cmu.edu/). We sincerely thank [Christian](https://www.cs.cmu.edu/~ckaestne/) and [Vincent](https://vhellendoorn.github.io/) for the wonderful course.
|
|
||||||
|
|
||||||
- This project is also inspired by the [pyecharts](https://github.com/pyecharts/pyecharts) and [go-echarts](https://github.com/go-echarts/go-echarts), which are the ECharts siblings in Python and Go languages.
|
- 本项目灵感来源于[卡耐基梅隆大学](https://www.cmu.edu/)的课程,[Principles of Software Construction Objects, Design, and Concurrency](https://cmu-17-214.github.io/f2021/)。我们在此真诚地感谢 [Christian](https://www.cs.cmu.edu/~ckaestne/) 和 [Vincent](https://vhellendoorn.github.io/) 在 2021 秋天教授的这门课。
|
||||||
|
|
||||||
## 🎈 License
|
- 本项目同样也受到 [pyecharts](https://github.com/pyecharts/pyecharts) 和 [go-echarts](https://github.com/go-echarts/go-echarts) 的启发。
|
||||||
|
|
||||||
ECharts Java is available under the [Apache License 2.0](LICENSE).
|
## 🎈 开源协议
|
||||||
|
|
||||||
|
本项目遵循 [Apache License 2.0](LICENSE) 开源协议。
|
||||||
|
|||||||
BIN
assets/imgs/animation-gauge.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
assets/imgs/basic-boxplot.jpg
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
assets/imgs/basic-candlestick.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
assets/imgs/basic-funnel.jpg
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
assets/imgs/basic-heatmap.jpg
Normal file
|
After Width: | Height: | Size: 132 KiB |
BIN
assets/imgs/basic-parallel.jpg
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
assets/imgs/basic-polar-line.jpg
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
assets/imgs/basic-polar-scatter.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
assets/imgs/basic-radar.jpg
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
assets/imgs/basic-rose.jpg
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
assets/imgs/basic-sankey.jpg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
assets/imgs/basic-scatter.jpg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
assets/imgs/basic-sunburst.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
assets/imgs/basic-theme-river.jpg
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
assets/imgs/circular-layout-graph.jpg
Normal file
|
After Width: | Height: | Size: 317 KiB |
BIN
assets/imgs/hide-overlapped-label-graph.jpg
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
assets/imgs/horizontal-stacked-bar.jpg
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
assets/imgs/line-renderHtml.gif
Normal file
|
After Width: | Height: | Size: 494 KiB |
BIN
assets/imgs/logo.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
assets/imgs/multibar-render.gif
Normal file
|
After Width: | Height: | Size: 4.3 MiB |
BIN
assets/imgs/multiple-series-bar.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
assets/imgs/nested-pie.jpg
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
assets/imgs/render-json-option.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
assets/imgs/stacked-area.jpg
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
assets/imgs/stacked-line.jpg
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
assets/imgs/tangential-polar-bar.jpg
Normal file
|
After Width: | Height: | Size: 100 KiB |