File tree 3 files changed +18
-47
lines changed
3 files changed +18
-47
lines changed Original file line number Diff line number Diff line change @@ -113,33 +113,6 @@ export class ChordEdge extends graphic.Path<ChordEdgePathProps> {
113
113
if ( firstCreate ) {
114
114
el . setShape ( shape ) ;
115
115
applyEdgeFill ( el , edge , nodeData , lineStyle ) ;
116
-
117
- if ( startAngle != null ) {
118
- const x = shape . cx + shape . r * Math . cos ( startAngle ) ;
119
- const y = shape . cy + shape . r * Math . sin ( startAngle ) ;
120
- el . setShape ( {
121
- s1 : [ x , y ] ,
122
- s2 : [ x , y ] ,
123
- sStartAngle : startAngle ,
124
- sEndAngle : startAngle ,
125
- t1 : [ x , y ] ,
126
- t2 : [ x , y ] ,
127
- tStartAngle : startAngle ,
128
- tEndAngle : startAngle
129
- } ) ;
130
- graphic . initProps ( el , {
131
- shape
132
- } , seriesModel , edgeIdx ) ;
133
- }
134
- else {
135
- el . setShape ( {
136
- sEndAngle : el . shape . sStartAngle ,
137
- tEndAngle : el . shape . tStartAngle
138
- } ) ;
139
- graphic . updateProps ( el , {
140
- shape
141
- } , seriesModel , edgeIdx ) ;
142
- }
143
116
}
144
117
else {
145
118
saveOldStyle ( el ) ;
Original file line number Diff line number Diff line change @@ -43,24 +43,11 @@ export default class ChordPiece extends graphic.Sector {
43
43
44
44
if ( firstCreate ) {
45
45
el . setShape ( shape ) ;
46
-
47
- if ( startAngle != null ) {
48
- el . setShape ( {
49
- startAngle,
50
- endAngle : startAngle
51
- } ) ;
52
- graphic . initProps ( el , {
53
- shape : {
54
- startAngle : shape . startAngle ,
55
- endAngle : shape . endAngle
56
- }
57
- } , seriesModel , idx ) ;
58
- }
59
- else {
60
- graphic . updateProps ( el , {
61
- shape : shape
62
- } , seriesModel , idx ) ;
63
- }
46
+ }
47
+ else {
48
+ graphic . updateProps ( el , {
49
+ shape : shape
50
+ } , seriesModel , idx ) ;
64
51
}
65
52
66
53
const sectorShape = extend (
Original file line number Diff line number Diff line change @@ -26,9 +26,8 @@ import SeriesData from '../../data/SeriesData';
26
26
import ChordSeriesModel from './ChordSeries' ;
27
27
import ChordPiece from './ChordPiece' ;
28
28
import { ChordEdge } from './ChordEdge' ;
29
- import { normalizeArcAngles } from 'zrender/src/core/PathProxy ' ;
29
+ import { parsePercent } from '../../util/number ' ;
30
30
31
- const PI2 = Math . PI * 2 ;
32
31
const RADIAN = Math . PI / 180 ;
33
32
34
33
class ChordView extends ChartView {
@@ -71,6 +70,18 @@ class ChordView extends ChartView {
71
70
72
71
. execute ( ) ;
73
72
73
+ if ( ! oldData ) {
74
+ const center = seriesModel . get ( 'center' ) ;
75
+ this . group . scaleX = 0.01 ;
76
+ this . group . scaleY = 0.01 ;
77
+ this . group . originX = parsePercent ( center [ 0 ] , api . getWidth ( ) ) ;
78
+ this . group . originY = parsePercent ( center [ 1 ] , api . getHeight ( ) ) ;
79
+ graphic . initProps ( this . group , {
80
+ scaleX : 1 ,
81
+ scaleY : 1
82
+ } , seriesModel ) ;
83
+ }
84
+
74
85
this . _data = data ;
75
86
76
87
this . renderEdges ( seriesModel , startAngle ) ;
You can’t perform that action at this time.
0 commit comments