Skip to content

Commit 0efa7bf

Browse files
committed
chore: readme show case with map
1 parent 7c22014 commit 0efa7bf

File tree

4 files changed

+31
-26
lines changed

4 files changed

+31
-26
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,19 @@ dependencies {
8383
### 🎨 Showcase
8484

8585
<div align="center">
86-
<img src="docs/assets/line-sample.png" width="25%" alt="bar"/>
86+
<img src="docs/assets/line-sample.png" width="25%" alt="line"/>
8787
<img src="docs/assets/bar.png" width="25%" alt="bar"/>
88-
<img src="docs/assets/candlestick.png" width="22%" alt="bar"/>
89-
<img src="docs/assets/overlap.png" width="24%" alt="bar"/>
90-
<img src="docs/assets/dynamic-pie.png" width="26%" alt="bar"/>
91-
<img src="docs/assets/funnel.png" width="23%" alt="bar"/>
92-
<img src="docs/assets/tree.png" width="22%" alt="bar"/>
93-
<img src="docs/assets/effectscatter.png" width="26%" alt="bar"/>
94-
<img src="docs/assets/sunburst.png" width="25%" alt="bar"/>
95-
<img src="docs/assets/radar.png" width="24%" alt="bar"/>
96-
<img src="docs/assets/liquidfill.png" width="24%" alt="bar"/>
97-
<img src="docs/assets/wordcloud.png" width="24%" alt="bar"/>
88+
<img src="docs/assets/candlestick.png" width="22%" alt="candlestick"/>
89+
<img src="docs/assets/overlap.png" width="24%" alt="overlap"/>
90+
<img src="docs/assets/dynamic-pie.png" width="26%" alt="dynamic-pie"/>
91+
<img src="docs/assets/funnel.png" width="23%" alt="funnel"/>
92+
<img src="docs/assets/tree.png" width="22%" alt="tree"/>
93+
<img src="docs/assets/effectscatter.png" width="26%" alt="effectscatter"/>
94+
<img src="docs/assets/sunburst.png" width="25%" alt="sunburst"/>
95+
<img src="docs/assets/radar.png" width="24%" alt="radar"/>
96+
<img src="docs/assets/liquidfill.png" width="24%" alt="liquidfill"/>
97+
<img src="docs/assets/wordcloud.png" width="24%" alt="wordcloud"/>
98+
<img src="docs/assets/cow.png" width="50%" alt="cowboy"/>
9899
</div>
99100

100101
---
@@ -141,7 +142,7 @@ In general, there are three key aspects to understand about building an Echarts
141142

142143
More details please see the [QuickStart](https://koooooo-7.github.io/echarts4j/#/QuickStart) and
143144
the [JavaDoc](https://javadoc.jitpack.io/com/github/koooooo-7/echarts4j/echarts4j-project/main-SNAPSHOT/javadoc/index.html)
144-
.
145+
, and the test cases also.
145146

146147
---
147148

README_ZH.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repositories {
3434
}
3535
3636
dependencies {
37-
implementation 'com.github.Koooooo-7.echarts4j:echarts4j-project:v1.0.0-SNAPSHOT'
37+
implementation 'com.github.Koooooo-7.echarts4j:echarts4j-project:v1.0.0'
3838
}
3939
4040
```
@@ -55,7 +55,7 @@ dependencies {
5555
<dependency>
5656
<groupId>com.github.Koooooo-7.echarts4j</groupId>
5757
<artifactId>echarts4j-project</artifactId>
58-
<version>v1.0.0-SNAPSHOT</version>
58+
<version>v1.0.0</version>
5959
</dependency>
6060
```
6161

@@ -72,18 +72,19 @@ dependencies {
7272
### 🎨 Showcase
7373

7474
<div align="center">
75-
<img src="docs/assets/line-sample.png" width="25%" alt="bar"/>
75+
<img src="docs/assets/line-sample.png" width="25%" alt="line"/>
7676
<img src="docs/assets/bar.png" width="25%" alt="bar"/>
77-
<img src="docs/assets/candlestick.png" width="22%" alt="bar"/>
78-
<img src="docs/assets/overlap.png" width="24%" alt="bar"/>
79-
<img src="docs/assets/dynamic-pie.png" width="26%" alt="bar"/>
80-
<img src="docs/assets/funnel.png" width="23%" alt="bar"/>
81-
<img src="docs/assets/tree.png" width="22%" alt="bar"/>
82-
<img src="docs/assets/effectscatter.png" width="26%" alt="bar"/>
83-
<img src="docs/assets/sunburst.png" width="25%" alt="bar"/>
84-
<img src="docs/assets/radar.png" width="24%" alt="bar"/>
85-
<img src="docs/assets/liquidfill.png" width="24%" alt="bar"/>
86-
<img src="docs/assets/wordcloud.png" width="24%" alt="bar"/>
77+
<img src="docs/assets/candlestick.png" width="22%" alt="candlestick"/>
78+
<img src="docs/assets/overlap.png" width="24%" alt="overlap"/>
79+
<img src="docs/assets/dynamic-pie.png" width="26%" alt="dynamic-pie"/>
80+
<img src="docs/assets/funnel.png" width="23%" alt="funnel"/>
81+
<img src="docs/assets/tree.png" width="22%" alt="tree"/>
82+
<img src="docs/assets/effectscatter.png" width="26%" alt="effectscatter"/>
83+
<img src="docs/assets/sunburst.png" width="25%" alt="sunburst"/>
84+
<img src="docs/assets/radar.png" width="24%" alt="radar"/>
85+
<img src="docs/assets/liquidfill.png" width="24%" alt="liquidfill"/>
86+
<img src="docs/assets/wordcloud.png" width="24%" alt="wordcloud"/>
87+
<img src="docs/assets/cow.png" width="50%" alt="cowboy"/>
8788
</div>
8889
---
8990

docs/assets/cow.png

367 KB
Loading

echarts4j-project/src/test/java/com/github/koooooo7/echarts4j/chart/MapChartTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.fasterxml.jackson.core.JsonProcessingException;
44
import com.fasterxml.jackson.databind.ObjectMapper;
55
import com.github.koooooo7.echarts4j.option.ChartOption;
6+
import com.github.koooooo7.echarts4j.option.chart.Title;
67
import com.github.koooooo7.echarts4j.option.chart.Tooltip;
78
import com.github.koooooo7.echarts4j.option.chart.VisualMap;
89
import com.github.koooooo7.echarts4j.option.series.map.Emphasis;
@@ -20,15 +21,17 @@
2021
class MapChartTests {
2122

2223

24+
// the case replicate from the official sample: https://echarts.apache.org/examples/en/editor.html?c=geo-beef-cuts
2325
@Test
24-
void testChart() throws JsonProcessingException {
26+
void shouldRenderTheCowPic_GivenTheRegisterMapAndConfig_WhenBuildTheMap() throws JsonProcessingException {
2527
final String registerMapScript = "./src/test/resources/data/map/asset/cow.js";
2628

2729
final Map map = new ObjectMapper().readValue(data, Map.class);
2830
final Object data = map.get("data");
2931
Canvas.builder()
3032
.addCharts(MapChart.builder()
3133
.options(ChartOption.builder()
34+
.title(Title.builder().text("Echarts4j-Cowboy").build())
3235
.tooltip(Tooltip.builder().build())
3336
.visualMap(Collections.singletonList(VisualMap.builder()
3437
.left(FuncStr.ofStr("center"))

0 commit comments

Comments
 (0)