You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by yu...@apache.org on 2021/02/02 12:05:18 UTC
[echarts] 01/01: fix(showLoading): #14188 text of loading covered
by charts
This is an automated email from the ASF dual-hosted git repository.
yufeng04 pushed a commit to branch fix-14188
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 2b558621a584489619967b9b0beef081647edf2d
Author: yufeng04 <74...@qq.com>
AuthorDate: Tue Feb 2 20:02:11 2021 +0800
fix(showLoading): #14188 text of loading covered by charts
---
src/loading/default.ts | 4 +++-
test/loading.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/src/loading/default.ts b/src/loading/default.ts
index 7bb8fd7..f0ebc55 100644
--- a/src/loading/default.ts
+++ b/src/loading/default.ts
@@ -82,7 +82,9 @@ export default function defaultLoading(
fontWeight: opts.fontWeight,
fontStyle: opts.fontStyle,
fontFamily: opts.fontFamily
- }
+ },
+ zlevel: opts.zlevel,
+ z: 10001
});
const labelRect = new graphic.Rect({
diff --git a/test/loading.html b/test/loading.html
index f7b1358..b1133c6 100644
--- a/test/loading.html
+++ b/test/loading.html
@@ -50,6 +50,8 @@ under the License.
<div class="chart" id="main4"></div>
<h1>fontSzie: 25, fontWeight: 'bolder', fontFamily: 'Microsoft YaHei', fontStyle: 'italic'</h1>
<div class="chart" id="main5"></div>
+ <h1>the spinner and text of loading show above the chart</h1>
+ <div class="chart" id="main6"></div>
<script>
require([
@@ -111,12 +113,56 @@ under the License.
lineWidth: 8,
zlevel: 0
});
+
+ var chart6 = echarts.init(document.getElementById('main6'));
+ chart6.setOption({
+ angleAxis: {
+ },
+ radiusAxis: {
+ type: 'category',
+ data: ['周一', '周二', '周三', '周四'],
+ z: 10
+ },
+ polar: {
+ },
+ series: [{
+ type: 'bar',
+ data: [3, 2, 3, 4],
+ coordinateSystem: 'polar',
+ showBackground: true,
+ name: 'A',
+ stack: 'a',
+ emphasis: {
+ focus: 'series'
+ }
+ }],
+ legend: {
+ show: true,
+ data: ['A', 'B', 'C']
+ }
+ });
+ chart6.showLoading({
+ text: '暂时没有数据',
+ textColor: '#000',
+ fontSize: 25,
+ fontWeight: 'bolder',
+ fontFamily: 'Microsoft YaHei',
+ fontStyle: 'italic',
+ maskColor: 'rgba(255, 255, 255, 0.8)',
+ color: '#c23531',
+ arcRadius: 20,
+ lineWidth: 8,
+ zlevel: 0
+ });
+
window.onresize = function () {
chart0.resize();
chart1.resize();
chart2.resize();
chart3.resize();
chart4.resize();
+ chart5.resize();
+ chart6.resize();
};
});
</script>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org