Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfccad5c

Browse files
add render serialization json
1 parent043e8e1 commitfccad5c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎src/main/java/org/icepear/echarts/render/Engine.java‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
publicclassEngine {
2020
privateHandlebarshandlebars;
2121

22-
publicEngine()throwsIOException{
22+
publicEngine() {
2323
this.handlebars =newHandlebars();
2424
}
2525

@@ -172,4 +172,23 @@ public String renderHtml(Option option, int height, int width) throws IOExceptio
172172
}
173173
}
174174

175+
/**
176+
* Render serialized json object of Option in Chart
177+
*
178+
* @param chart the chart to be rendered
179+
* @return a string representation of a json object
180+
*/
181+
publicStringrenderJsonOption(Chart<?, ?>chart) {
182+
returnEChartsSerializer.toJson(chart.getOption());
183+
}
184+
185+
/**
186+
* Render serialized json object of an Option
187+
* @param option the option to be serialized
188+
* @return a string representation of a json object
189+
*/
190+
publicStringrenderJsonOption(Optionoption) {
191+
returnEChartsSerializer.toJson(option);
192+
}
193+
175194
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp