You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/06/18 01:01:37 UTC
[incubator-echarts-doc] branch live-example updated: example: fix
missing parsed code when having special char
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch live-example
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-doc.git
The following commit(s) were added to refs/heads/live-example by this push:
new 4730b30 example: fix missing parsed code when having special char
4730b30 is described below
commit 4730b3022676dd04ec76d3dc9b6c7e8db18787b5
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Jun 18 09:01:24 2020 +0800
example: fix missing parsed code when having special char
---
tool/md2json.js | 2 +-
zh/option/component/polar.md | 58 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/tool/md2json.js b/tool/md2json.js
index 37a8043..bcc0052 100644
--- a/tool/md2json.js
+++ b/tool/md2json.js
@@ -243,7 +243,7 @@ function mdToJsonSchema(mdStr, maxDepth, imagePath) {
},
ontext(data) {
if (currentExampleCode) {
- currentExampleCode.code = entities.decode(data);
+ currentExampleCode.code += entities.decode(data);
}
else {
out += data;
diff --git a/zh/option/component/polar.md b/zh/option/component/polar.md
index 86f6e1d..8cf5df4 100644
--- a/zh/option/component/polar.md
+++ b/zh/option/component/polar.md
@@ -9,6 +9,64 @@
~[600x400](${galleryViewPath}scatter-polar-punchCard&edit=1&reset=1)
+<ExampleBaseOption name="polar" title="极坐标系">
+
+const hours = ['12a', '1a', '2a', '3a', '4a', '5a', '6a',
+ '7a', '8a', '9a','10a','11a',
+ '12p', '1p', '2p', '3p', '4p', '5p',
+ '6p', '7p', '8p', '9p', '10p', '11p'];
+const days = ['Saturday', 'Friday', 'Thursday',
+ 'Wednesday', 'Tuesday', 'Monday', 'Sunday'];
+
+const data = [[0,0,5],[0,1,1],[0,2,0],[0,3,0],[0,4,0],[0,5,0],[0,6,0],[0,7,0],[0,8,0],[0,9,0],[0,10,0],[0,11,2],[0,12,4],[0,13,1],[0,14,1],[0,15,3],[0,16,4],[0,17,6],[0,18,4],[0,19,4],[0,20,3],[0,21,3],[0,22,2],[0,23,5],[1,0,7],[1,1,0],[1,2,0],[1,3,0],[1,4,0],[1,5,0],[1,6,0],[1,7,0],[1,8,0],[1,9,0],[1,10,5],[1,11,2],[1,12,2],[1,13,6],[1,14,9],[1,15,11],[1,16,6],[1,17,7],[1,18,8],[1,19,12],[1,20,5],[1,21,5],[1,22,7],[1,23,2],[2,0,1],[2,1,1],[2,2,0],[2,3,0],[2,4,0],[2,5,0],[2,6,0],[2,7,0], [...]
+
+const option = {
+ title: {
+ text: 'Punch Card of Github',
+ link: 'https://github.com/pissang/echarts-next/graphs/punch-card'
+ },
+ legend: {
+ data: ['Punch Card'],
+ left: 'right'
+ },
+ polar: {},
+ angleAxis: {
+ type: 'category',
+ data: hours,
+ boundaryGap: false,
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#999',
+ type: 'dashed'
+ }
+ },
+ axisLine: {
+ show: false
+ }
+ },
+ radiusAxis: {
+ type: 'category',
+ data: days,
+ axisLine: {
+ show: false
+ },
+ axisLabel: {
+ rotate: 45
+ }
+ },
+ series: [{
+ name: 'Punch Card',
+ type: 'scatter',
+ coordinateSystem: 'polar',
+ symbolSize: function (val) {
+ return val[2] * 2;
+ },
+ data: data
+ }]
+};
+</ExampleBaseOption>
+
{{use: partial-component-id(prefix="#")}}
{{use: component-circular-layout(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org