]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * @class Ext.chart.series.sprite.Polar\r | |
3 | * @extends Ext.draw.sprite.Sprite\r | |
4 | * \r | |
5 | * Polar sprite.\r | |
6 | */\r | |
7 | Ext.define('Ext.chart.series.sprite.Polar', {\r | |
8 | extend: 'Ext.chart.series.sprite.Series',\r | |
9 | \r | |
10 | inheritableStatics: {\r | |
11 | def: {\r | |
12 | processors: {\r | |
13 | /**\r | |
14 | * @cfg {Number} [centerX=0] The central point of the series on the x-axis.\r | |
15 | */\r | |
16 | centerX: 'number',\r | |
17 | \r | |
18 | /**\r | |
19 | * @cfg {Number} [centerY=0] The central point of the series on the y-axis.\r | |
20 | */\r | |
21 | centerY: 'number',\r | |
22 | \r | |
23 | /**\r | |
24 | * @cfg {Number} [startAngle=0] The starting angle of the polar series.\r | |
25 | */\r | |
26 | startAngle: 'number',\r | |
27 | \r | |
28 | /**\r | |
29 | * @cfg {Number} [endAngle=Math.PI] The ending angle of the polar series.\r | |
30 | */\r | |
31 | endAngle: 'number',\r | |
32 | \r | |
33 | /**\r | |
34 | * @cfg {Number} [startRho=0] The starting radius of the polar series.\r | |
35 | */\r | |
36 | startRho: 'number',\r | |
37 | \r | |
38 | /**\r | |
39 | * @cfg {Number} [endRho=150] The ending radius of the polar series.\r | |
40 | */\r | |
41 | endRho: 'number',\r | |
42 | \r | |
43 | /**\r | |
44 | * @cfg {Number} [baseRotation=0] The starting rotation of the polar series.\r | |
45 | */\r | |
46 | baseRotation: 'number',\r | |
47 | \r | |
48 | /**\r | |
49 | * @cfg {Object} [labels=null] Labels used in the series.\r | |
50 | */\r | |
51 | labels: 'default',\r | |
52 | \r | |
53 | /**\r | |
54 | * @cfg {Number} [labelOverflowPadding=10] Padding around labels to determine overlap.\r | |
55 | */\r | |
56 | labelOverflowPadding: 'number'\r | |
57 | },\r | |
58 | defaults: {\r | |
59 | centerX: 0,\r | |
60 | centerY: 0,\r | |
61 | startAngle: 0,\r | |
62 | endAngle: Math.PI,\r | |
63 | startRho: 0,\r | |
64 | endRho: 150,\r | |
65 | baseRotation: 0,\r | |
66 | labels: null,\r | |
67 | labelOverflowPadding: 10\r | |
68 | },\r | |
69 | triggers: {\r | |
70 | centerX: 'bbox',\r | |
71 | centerY: 'bbox',\r | |
72 | startAngle: 'bbox',\r | |
73 | endAngle: 'bbox',\r | |
74 | startRho: 'bbox',\r | |
75 | endRho: 'bbox',\r | |
76 | baseRotation: 'bbox'\r | |
77 | }\r | |
78 | }\r | |
79 | },\r | |
80 | \r | |
81 | updatePlainBBox: function (plain) {\r | |
82 | var attr = this.attr;\r | |
83 | plain.x = attr.centerX - attr.endRho;\r | |
84 | plain.y = attr.centerY + attr.endRho;\r | |
85 | plain.width = attr.endRho * 2;\r | |
86 | plain.height = attr.endRho * 2;\r | |
87 | }\r | |
88 | }); |