From 39a47bedb8912d130cda8cf895e2665fa9ab1793 Mon Sep 17 00:00:00 2001 From: pah100 Date: Wed, 15 Mar 2017 19:53:00 +0800 Subject: [PATCH] polar enable specified by polarId (but not only polarIndex) --- src/component/axis/AngleAxisView.js | 3 +-- src/component/axis/RadiusAxisView.js | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/component/axis/AngleAxisView.js b/src/component/axis/AngleAxisView.js index 487e7d757..c1da546f3 100644 --- a/src/component/axis/AngleAxisView.js +++ b/src/component/axis/AngleAxisView.js @@ -32,9 +32,8 @@ define(function (require) { return; } - var polarModel = ecModel.getComponent('polar', angleAxisModel.get('polarIndex')); var angleAxis = angleAxisModel.axis; - var polar = polarModel.coordinateSystem; + var polar = angleAxis.polar; var radiusExtent = polar.getRadiusAxis().getExtent(); var ticksAngles = angleAxis.getTicksCoords(); diff --git a/src/component/axis/RadiusAxisView.js b/src/component/axis/RadiusAxisView.js index f8e393905..7517575d4 100644 --- a/src/component/axis/RadiusAxisView.js +++ b/src/component/axis/RadiusAxisView.js @@ -25,10 +25,9 @@ define(function (require) { if (!radiusAxisModel.get('show')) { return; } - var polarModel = ecModel.getComponent('polar', radiusAxisModel.get('polarIndex')); - var angleAxis = polarModel.coordinateSystem.getAngleAxis(); var radiusAxis = radiusAxisModel.axis; - var polar = polarModel.coordinateSystem; + var polar = radiusAxis.polar; + var angleAxis = polar.getAngleAxis(); var ticksCoords = radiusAxis.getTicksCoords(); var axisAngle = angleAxis.getExtent()[0]; var radiusExtent = radiusAxis.getExtent(); -- GitLab