You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2022/11/11 10:53:25 UTC
[echarts-examples] branch gh-pages updated: fix: remove deprecated `normal` level from some examples
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new 28255a8f fix: remove deprecated `normal` level from some examples
28255a8f is described below
commit 28255a8fc7334c8bb06623b320b9acc28d50ad7c
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Fri Nov 11 18:51:02 2022 +0800
fix: remove deprecated `normal` level from some examples
---
.../examples/ts/doc-example/text-block-fragment.js | 125 ++++++-----
.../examples/ts/doc-example/text-fregment-align.js | 233 ++++++++++----------
public/examples/ts/doc-example/text-options.js | 173 ++++++++-------
public/examples/ts/doc-example/title-block.js | 244 ++++++++++-----------
4 files changed, 380 insertions(+), 395 deletions(-)
diff --git a/public/examples/ts/doc-example/text-block-fragment.js b/public/examples/ts/doc-example/text-block-fragment.js
index bb119561..54b29b0d 100644
--- a/public/examples/ts/doc-example/text-block-fragment.js
+++ b/public/examples/ts/doc-example/text-block-fragment.js
@@ -1,67 +1,64 @@
-
option = {
- series: [
- {
- type: 'scatter',
- data: [[0,0]],
- symbolSize: 1,
- label: {
- normal: {
- show: true,
- formatter: [
- 'The whole box is a {term|Text Block}, with',
- 'red border and grey background.',
- '{fragment1|A Text Fragment} {fragment2|Another Text Fragment}',
- 'Text fragments can be customized.'
- ].join('\n'),
- backgroundColor: '#eee',
- // borderColor: '#333',
- borderColor: 'rgb(199,86,83)',
- borderWidth: 2,
- borderRadius: 5,
- padding: 10,
- color: '#000',
- fontSize: 14,
- shadowBlur: 3,
- shadowColor: '#888',
- shadowOffsetX: 0,
- shadowOffsetY: 3,
- lineHeight: 30,
- rich: {
- term: {
- fontSize: 18,
- color: 'rgb(199,86,83)'
- },
- fragment1: {
- backgroundColor: '#000',
- color: 'yellow',
- padding: 5
- },
- fragment2: {
- backgroundColor: '#339911',
- color: '#fff',
- borderRadius: 15,
- padding: 5
- }
- }
- }
- }
+ series: [
+ {
+ type: 'scatter',
+ data: [[0, 0]],
+ symbolSize: 1,
+ label: {
+ show: true,
+ formatter: [
+ 'The whole box is a {term|Text Block}, with',
+ 'red border and grey background.',
+ '{fragment1|A Text Fragment} {fragment2|Another Text Fragment}',
+ 'Text fragments can be customized.'
+ ].join('\n'),
+ backgroundColor: '#eee',
+ // borderColor: '#333',
+ borderColor: 'rgb(199,86,83)',
+ borderWidth: 2,
+ borderRadius: 5,
+ padding: 10,
+ color: '#000',
+ fontSize: 14,
+ shadowBlur: 3,
+ shadowColor: '#888',
+ shadowOffsetX: 0,
+ shadowOffsetY: 3,
+ lineHeight: 30,
+ rich: {
+ term: {
+ fontSize: 18,
+ color: 'rgb(199,86,83)'
+ },
+ fragment1: {
+ backgroundColor: '#000',
+ color: 'yellow',
+ padding: 5
+ },
+ fragment2: {
+ backgroundColor: '#339911',
+ color: '#fff',
+ borderRadius: 15,
+ padding: 5
+ }
}
- ],
- xAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
- },
- yAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
+ }
}
-};
\ No newline at end of file
+ ],
+ xAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ },
+ yAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ }
+};
diff --git a/public/examples/ts/doc-example/text-fregment-align.js b/public/examples/ts/doc-example/text-fregment-align.js
index 9636d21c..4e59672e 100644
--- a/public/examples/ts/doc-example/text-fregment-align.js
+++ b/public/examples/ts/doc-example/text-fregment-align.js
@@ -1,121 +1,118 @@
-
option = {
- series: [
- {
- type: 'scatter',
- data: [[0,0]],
- symbolSize: 1,
- label: {
- normal: {
- show: true,
- formatter: [
- '{tc|height is specified as 30}{box|}',
- '{lh|Biggest lineHeight} {vt|verticalAlign "top"} {vb|verticalAlign "bottom"} {vm|verticalAlign "middle"}',
- '{l1|align "left"}{l2|align "left"}{c1|align "center"}{c2|align "center"}{r2|align "right"}{r1|align "right"}',
- '{tc|height is specified as 30}{box|}',
- ].join('\n'),
- backgroundColor: '#ddd',
- borderColor: '#555',
- borderWidth: 1,
- borderRadius: 5,
- padding: [0, 20, 0, 20],
- color: '#000',
- fontSize: 14,
- rich: {
- box: {
- backgroundColor: '#000',
- height: 30,
- padding: [0, 20, 0, 20],
- align: 'right',
- width: '100%',
- color: '#eee'
- },
- tc: {
- align: 'center',
- color: '#eee'
- },
- lh: {
- fontSize: 30,
- color: 'rgb(199,86,83)',
- borderWidth: 1,
- borderColor: 'rgb(199,86,83)'
- },
- vt: {
- verticalAlign: 'top',
- backgroundColor: '#991122',
- color: '#fff',
- padding: [1, 2, 1, 2]
- },
- vb: {
- verticalAlign: 'bottom',
- backgroundColor: '#991122',
- color: '#fff',
- padding: [1, 2, 1, 2]
- },
- vm: {
- verticalAlign: 'middle',
- backgroundColor: '#991122',
- color: '#fff',
- padding: [1, 2, 1, 2]
- },
- l1: {
- backgroundColor: '#7066FF',
- color: '#fff',
- padding: 5
- },
- l2: {
- backgroundColor: '#339911',
- color: '#fff',
- borderRadius: 15,
- padding: 5
- },
- r1: {
- backgroundColor: '#7066FF',
- align: 'right',
- color: '#fff',
- padding: 5
- },
- r2: {
- backgroundColor: '#339911',
- align: 'right',
- color: '#fff',
- borderRadius: 15,
- padding: 5
- },
- c1: {
- backgroundColor: '#7066FF',
- align: 'center',
- color: '#fff',
- padding: 5,
- width: 100
- },
- c2: {
- backgroundColor: '#339911',
- align: 'center',
- color: '#fff',
- borderRadius: 15,
- padding: 5,
- width: 100
- }
- }
- }
- }
+ series: [
+ {
+ type: 'scatter',
+ data: [[0, 0]],
+ symbolSize: 1,
+ label: {
+ show: true,
+ formatter: [
+ '{tc|height is specified as 30}{box|}',
+ '{lh|Biggest lineHeight} {vt|verticalAlign "top"} {vb|verticalAlign "bottom"} {vm|verticalAlign "middle"}',
+ '{l1|align "left"}{l2|align "left"}{c1|align "center"}{c2|align "center"}{r2|align "right"}{r1|align "right"}',
+ '{tc|height is specified as 30}{box|}'
+ ].join('\n'),
+ backgroundColor: '#ddd',
+ borderColor: '#555',
+ borderWidth: 1,
+ borderRadius: 5,
+ padding: [0, 20, 0, 20],
+ color: '#000',
+ fontSize: 14,
+ rich: {
+ box: {
+ backgroundColor: '#000',
+ height: 30,
+ padding: [0, 20, 0, 20],
+ align: 'right',
+ width: '100%',
+ color: '#eee'
+ },
+ tc: {
+ align: 'center',
+ color: '#eee'
+ },
+ lh: {
+ fontSize: 30,
+ color: 'rgb(199,86,83)',
+ borderWidth: 1,
+ borderColor: 'rgb(199,86,83)'
+ },
+ vt: {
+ verticalAlign: 'top',
+ backgroundColor: '#991122',
+ color: '#fff',
+ padding: [1, 2, 1, 2]
+ },
+ vb: {
+ verticalAlign: 'bottom',
+ backgroundColor: '#991122',
+ color: '#fff',
+ padding: [1, 2, 1, 2]
+ },
+ vm: {
+ verticalAlign: 'middle',
+ backgroundColor: '#991122',
+ color: '#fff',
+ padding: [1, 2, 1, 2]
+ },
+ l1: {
+ backgroundColor: '#7066FF',
+ color: '#fff',
+ padding: 5
+ },
+ l2: {
+ backgroundColor: '#339911',
+ color: '#fff',
+ borderRadius: 15,
+ padding: 5
+ },
+ r1: {
+ backgroundColor: '#7066FF',
+ align: 'right',
+ color: '#fff',
+ padding: 5
+ },
+ r2: {
+ backgroundColor: '#339911',
+ align: 'right',
+ color: '#fff',
+ borderRadius: 15,
+ padding: 5
+ },
+ c1: {
+ backgroundColor: '#7066FF',
+ align: 'center',
+ color: '#fff',
+ padding: 5,
+ width: 100
+ },
+ c2: {
+ backgroundColor: '#339911',
+ align: 'center',
+ color: '#fff',
+ borderRadius: 15,
+ padding: 5,
+ width: 100
+ }
}
- ],
- xAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
- },
- yAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
+ }
}
-};
\ No newline at end of file
+ ],
+ xAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ },
+ yAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ }
+};
diff --git a/public/examples/ts/doc-example/text-options.js b/public/examples/ts/doc-example/text-options.js
index 5a95e391..87fb69aa 100644
--- a/public/examples/ts/doc-example/text-options.js
+++ b/public/examples/ts/doc-example/text-options.js
@@ -1,91 +1,90 @@
-
option = {
- series: [
+ series: [
+ {
+ type: 'scatter',
+ symbolSize: 1,
+ data: [
{
- type: 'scatter',
- symbolSize: 1,
- data: [{
- value: [0, 0],
- label: {
- normal: {
- show: true,
- formatter: [
- 'Plain text',
- '{textBorder|textBorderColor + textBorderWidth}',
- '{textShadow|textShadowColor + textShadowBlur + textShadowOffsetX + textShadowOffsetY}',
- '{bg|backgroundColor + borderRadius + padding}',
- '{border|borderColor + borderWidth + borderRadius + padding}',
- '{shadow|shadowColor + shadowBlur + shadowOffsetX + shadowOffsetY}'
- ].join('\n'),
- backgroundColor: '#eee',
- borderColor: '#333',
- borderWidth: 2,
- borderRadius: 5,
- padding: 10,
- color: '#000',
- fontSize: 14,
- shadowBlur: 3,
- shadowColor: '#888',
- shadowOffsetX: 0,
- shadowOffsetY: 3,
- lineHeight: 30,
- rich: {
- textBorder: {
- fontSize: 20,
- textBorderColor: '#000',
- textBorderWidth: 3,
- color: '#fff'
- },
- textShadow: {
- fontSize: 16,
- textShadowBlur: 5,
- textShadowColor: '#000',
- textShadowOffsetX: 3,
- textShadowOffsetY: 3,
- color: '#fff'
- },
- bg: {
- backgroundColor: '#339911',
- color: '#fff',
- borderRadius: 15,
- padding: 5
- },
- border: {
- color: '#000',
- borderColor: '#449911',
- borderWidth: 1,
- borderRadius: 3,
- padding: 5
- },
- shadow: {
- backgroundColor: '#992233',
- padding: 5,
- color: '#fff',
- shadowBlur: 5,
- shadowColor: '#336699',
- shadowOffsetX: 6,
- shadowOffsetY: 6
- }
- }
- }
- }
- }]
+ value: [0, 0],
+ label: {
+ show: true,
+ formatter: [
+ 'Plain text',
+ '{textBorder|textBorderColor + textBorderWidth}',
+ '{textShadow|textShadowColor + textShadowBlur + textShadowOffsetX + textShadowOffsetY}',
+ '{bg|backgroundColor + borderRadius + padding}',
+ '{border|borderColor + borderWidth + borderRadius + padding}',
+ '{shadow|shadowColor + shadowBlur + shadowOffsetX + shadowOffsetY}'
+ ].join('\n'),
+ backgroundColor: '#eee',
+ borderColor: '#333',
+ borderWidth: 2,
+ borderRadius: 5,
+ padding: 10,
+ color: '#000',
+ fontSize: 14,
+ shadowBlur: 3,
+ shadowColor: '#888',
+ shadowOffsetX: 0,
+ shadowOffsetY: 3,
+ lineHeight: 30,
+ rich: {
+ textBorder: {
+ fontSize: 20,
+ textBorderColor: '#000',
+ textBorderWidth: 3,
+ color: '#fff'
+ },
+ textShadow: {
+ fontSize: 16,
+ textShadowBlur: 5,
+ textShadowColor: '#000',
+ textShadowOffsetX: 3,
+ textShadowOffsetY: 3,
+ color: '#fff'
+ },
+ bg: {
+ backgroundColor: '#339911',
+ color: '#fff',
+ borderRadius: 15,
+ padding: 5
+ },
+ border: {
+ color: '#000',
+ borderColor: '#449911',
+ borderWidth: 1,
+ borderRadius: 3,
+ padding: 5
+ },
+ shadow: {
+ backgroundColor: '#992233',
+ padding: 5,
+ color: '#fff',
+ shadowBlur: 5,
+ shadowColor: '#336699',
+ shadowOffsetX: 6,
+ shadowOffsetY: 6
+ }
+ }
+ }
}
- ],
- xAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
- },
- yAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
+ ]
}
-};
\ No newline at end of file
+ ],
+ xAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ },
+ yAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ }
+};
diff --git a/public/examples/ts/doc-example/title-block.js b/public/examples/ts/doc-example/title-block.js
index 1d3f4243..1d264526 100644
--- a/public/examples/ts/doc-example/title-block.js
+++ b/public/examples/ts/doc-example/title-block.js
@@ -1,134 +1,126 @@
var weatherIcons = {
- 'Sunny': ROOT_PATH + '/data/asset/img/weather/sunny_128.png',
- 'Cloudy': ROOT_PATH + '/data/asset/img/weather/cloudy_128.png',
- 'Showers': ROOT_PATH + '/data/asset/img/weather/showers_128.png'
+ Sunny: ROOT_PATH + '/data/asset/img/weather/sunny_128.png',
+ Cloudy: ROOT_PATH + '/data/asset/img/weather/cloudy_128.png',
+ Showers: ROOT_PATH + '/data/asset/img/weather/showers_128.png'
};
option = {
- series: [
+ series: [
+ {
+ type: 'scatter',
+ data: [
{
- type: 'scatter',
- data: [
- {
- value: [0,0],
- label: {
- normal: {
- formatter: [
- '{tc|Center Title}{titleBg|}',
- ' Content text xxxxxxxx {sunny|} xxxxxxxx {cloudy|} ',
- '{hr|}',
- ' xxxxx {showers|} xxxxxxxx xxxxxxxxx '
- ].join('\n'),
- rich: {
- titleBg: {
- align: 'right'
- }
- }
- }
- }
- },
- {
- value: [0, 1],
- label: {
- normal: {
- formatter: [
- '{titleBg|Left Title}',
- ' Content text xxxxxxxx {sunny|} xxxxxxxx {cloudy|} ',
- '{hr|}',
- ' xxxxx {showers|} xxxxxxxx xxxxxxxxx '
- ].join('\n')
- }
- }
- },
- {
- value: [0, 2],
- label: {
- normal: {
- formatter: [
- '{titleBg|Right Title}',
- ' Content text xxxxxxxx {sunny|} xxxxxxxx {cloudy|} ',
- '{hr|}',
- ' xxxxx {showers|} xxxxxxxx xxxxxxxxx '
- ].join('\n'),
- rich: {
- titleBg: {
- align: 'right'
- }
- }
- }
- }
- }
- ],
- symbolSize: 1,
- label: {
- normal: {
- show: true,
- backgroundColor: '#ddd',
- borderColor: '#555',
- borderWidth: 1,
- borderRadius: 5,
- color: '#000',
- fontSize: 14,
- rich: {
- titleBg: {
- backgroundColor: '#000',
- height: 30,
- borderRadius: [5, 5, 0, 0],
- padding: [0, 10, 0, 10],
- width: '100%',
- color: '#eee'
- },
- tc: {
- align: 'center',
- color: '#eee'
- },
- hr: {
- borderColor: '#777',
- width: '100%',
- borderWidth: 0.5,
- height: 0
- },
- sunny: {
- height: 30,
- align: 'left',
- backgroundColor: {
- image: weatherIcons.Sunny
- }
- },
- cloudy: {
- height: 30,
- align: 'left',
- backgroundColor: {
- image: weatherIcons.Cloudy
- }
- },
- showers: {
- height: 30,
- align: 'left',
- backgroundColor: {
- image: weatherIcons.Showers
- }
- }
- }
- }
+ value: [0, 0],
+ label: {
+ formatter: [
+ '{tc|Center Title}{titleBg|}',
+ ' Content text xxxxxxxx {sunny|} xxxxxxxx {cloudy|} ',
+ '{hr|}',
+ ' xxxxx {showers|} xxxxxxxx xxxxxxxxx '
+ ].join('\n'),
+ rich: {
+ titleBg: {
+ align: 'right'
+ }
}
+ }
+ },
+ {
+ value: [0, 1],
+ label: {
+ formatter: [
+ '{titleBg|Left Title}',
+ ' Content text xxxxxxxx {sunny|} xxxxxxxx {cloudy|} ',
+ '{hr|}',
+ ' xxxxx {showers|} xxxxxxxx xxxxxxxxx '
+ ].join('\n')
+ }
+ },
+ {
+ value: [0, 2],
+ label: {
+ formatter: [
+ '{titleBg|Right Title}',
+ ' Content text xxxxxxxx {sunny|} xxxxxxxx {cloudy|} ',
+ '{hr|}',
+ ' xxxxx {showers|} xxxxxxxx xxxxxxxxx '
+ ].join('\n'),
+ rich: {
+ titleBg: {
+ align: 'right'
+ }
+ }
+ }
+ }
+ ],
+ symbolSize: 1,
+ label: {
+ show: true,
+ backgroundColor: '#ddd',
+ borderColor: '#555',
+ borderWidth: 1,
+ borderRadius: 5,
+ color: '#000',
+ fontSize: 14,
+ rich: {
+ titleBg: {
+ backgroundColor: '#000',
+ height: 30,
+ borderRadius: [5, 5, 0, 0],
+ padding: [0, 10, 0, 10],
+ width: '100%',
+ color: '#eee'
+ },
+ tc: {
+ align: 'center',
+ color: '#eee'
+ },
+ hr: {
+ borderColor: '#777',
+ width: '100%',
+ borderWidth: 0.5,
+ height: 0
+ },
+ sunny: {
+ height: 30,
+ align: 'left',
+ backgroundColor: {
+ image: weatherIcons.Sunny
+ }
+ },
+ cloudy: {
+ height: 30,
+ align: 'left',
+ backgroundColor: {
+ image: weatherIcons.Cloudy
+ }
+ },
+ showers: {
+ height: 30,
+ align: 'left',
+ backgroundColor: {
+ image: weatherIcons.Showers
+ }
+ }
}
- ],
- xAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: -1,
- max: 1
- },
- yAxis: {
- axisLabel: {show: false},
- axisLine: {show: false},
- splitLine: {show: false},
- axisTick: {show: false},
- min: 0,
- max: 2,
- inverse: true
+ }
}
-};
\ No newline at end of file
+ ],
+ xAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: -1,
+ max: 1
+ },
+ yAxis: {
+ axisLabel: { show: false },
+ axisLine: { show: false },
+ splitLine: { show: false },
+ axisTick: { show: false },
+ min: 0,
+ max: 2,
+ inverse: true
+ }
+};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org