Skip to content

Commit

Permalink
if grid type is not set, it should be line
Browse files Browse the repository at this point in the history
  • Loading branch information
simaQ committed May 4, 2018
1 parent 4518ee2 commit eff1ffb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/component/axis/abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,7 @@ class Abastract {
const container = self.getContainer(gridCfg.top);
let shape;

if (type === 'line') {
shape = container.addShape('Polyline', {
className: 'axis-grid',
attrs: Util.mix({
points
}, gridCfg)
});
} else if (type === 'arc') {
if (type === 'arc') {
const { center, startAngle, endAngle } = self;
const radius = Vector2.length([ points[0].x - center.x, points[0].y - center.y ]);
shape = container.addShape('Arc', {
Expand All @@ -129,6 +122,13 @@ class Abastract {
r: radius
}, gridCfg)
});
} else {
shape = container.addShape('Polyline', {
className: 'axis-grid',
attrs: Util.mix({
points
}, gridCfg)
});
}

shape._id = subPoints._id;
Expand Down

0 comments on commit eff1ffb

Please sign in to comment.