You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/10/15 09:11:15 UTC

[GitHub] [incubator-echarts] pissang commented on a change in pull request #11393: feat: support round cap for polar bars

pissang commented on a change in pull request #11393: feat: support round cap for polar bars
URL: https://github.com/apache/incubator-echarts/pull/11393#discussion_r334829124
 
 

 ##########
 File path: src/component/axis/AngleAxisView.js
 ##########
 @@ -96,19 +96,24 @@ export default AxisView.extend({
     _axisLine: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
         var lineStyleModel = angleAxisModel.getModel('axisLine.lineStyle');
 
-        var circle = new graphic.Circle({
-            shape: {
-                cx: polar.cx,
-                cy: polar.cy,
-                r: radiusExtent[getRadiusIdx(polar)]
-            },
-            style: lineStyleModel.getLineStyle(),
-            z2: 1,
-            silent: true
-        });
-        circle.style.fill = null;
-
-        this.group.add(circle);
+        for (var rx = 0; rx < radiusExtent.length; ++rx) {
+            // Draw a circle for radius like [0, 100], and two circles for [20, 100]
+            if (radiusExtent[rx] > 0) {
+                var circle = new graphic.Circle({
+                    shape: {
+                        cx: polar.cx,
+                        cy: polar.cy,
+                        r: radiusExtent[rx]
+                    },
+                    style: lineStyleModel.getLineStyle(),
+                    z2: 1,
+                    silent: true
+                });
+                circle.style.fill = null;
+
+                this.group.add(circle);
+            }
+        }
     },
 
 Review comment:
   You can use the `Ring` shape to get a hole in the circle

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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