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/04/26 11:43:19 UTC

[incubator-echarts] branch fix-polar-bar-background created (now 582cd73)

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a change to branch fix-polar-bar-background
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


      at 582cd73  fix(bar): fix bar background incorrect on polar

This branch includes the following new commits:

     new 582cd73  fix(bar): fix bar background incorrect on polar

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 01/01: fix(bar): fix bar background incorrect on polar

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch fix-polar-bar-background
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 582cd73a11ea93a42c6117bc4050d4fd11b33882
Author: pissang <bm...@gmail.com>
AuthorDate: Sun Apr 26 19:43:01 2020 +0800

    fix(bar): fix bar background incorrect on polar
---
 src/chart/bar/BarView.js | 10 ++++++++--
 test/bar-background.html | 10 +++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/chart/bar/BarView.js b/src/chart/bar/BarView.js
index 747f4ad..e100870 100644
--- a/src/chart/bar/BarView.js
+++ b/src/chart/bar/BarView.js
@@ -144,7 +144,10 @@ export default echarts.extendChartView({
                     var bgLayout = getLayout[coord.type](data, dataIndex);
                     var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
                     bgEl.useStyle(backgroundModel.getBarItemStyle());
-                    bgEl.setShape('r', barBorderRadius);
+                    // Only cartesian2d support borderRadius.
+                    if (coord.type === 'cartesian2d') {
+                        bgEl.setShape('r', barBorderRadius);
+                    }
                     bgEls[dataIndex] = bgEl;
                 }
 
@@ -181,7 +184,10 @@ export default echarts.extendChartView({
                 if (drawBackground) {
                     var bgEl = oldBgEls[oldIndex];
                     bgEl.useStyle(backgroundModel.getBarItemStyle());
-                    bgEl.setShape('r', barBorderRadius);
+                    // Only cartesian2d support borderRadius.
+                    if (coord.type === 'cartesian2d') {
+                        bgEl.setShape('r', barBorderRadius);
+                    }
                     bgEls[newIndex] = bgEl;
 
                     var bgLayout = getLayout[coord.type](data, newIndex);
diff --git a/test/bar-background.html b/test/bar-background.html
index 1ca94f3..8164f72 100644
--- a/test/bar-background.html
+++ b/test/bar-background.html
@@ -227,7 +227,7 @@ under the License.
                 var chart = testHelper.create(echarts, 'main1', {
                     option: option,
                     title: [
-                        'large mode'
+                        'Background with large render mode.'
                     ]
                 });
             });
@@ -299,7 +299,7 @@ under the License.
                 var chart = testHelper.create(echarts, 'main2', {
                     option: option,
                     title: [
-                        'normal bars'
+                        'Background with normal render mode.'
                     ]
                 });
             });
@@ -345,7 +345,7 @@ under the License.
                 var chart = testHelper.create(echarts, 'main3', {
                     option: option,
                     title: [
-                        'polar bars'
+                        'Bar background on radial polar'
                     ]
                 });
             });
@@ -392,7 +392,7 @@ under the License.
                 var chart = testHelper.create(echarts, 'main4', {
                     option: option,
                     title: [
-                        'polar bars'
+                        'Bar background on tangential polar'
                     ]
                 });
             });
@@ -446,7 +446,7 @@ under the License.
                 var chart = testHelper.create(echarts, 'main5', {
                     option: option,
                     title: [
-                        'polar bars'
+                        'Multiple bar series with background on radial polar'
                     ]
                 });
             });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org