]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * A filled radar chart has the area between axes and lines filled with colors across all\r | |
3 | * axes.\r | |
4 | *\r | |
5 | * The example makes use of the 'rotate' interaction. To use it, click or tap and then drag\r | |
6 | * anywhere on the chart.\r | |
7 | */\r | |
8 | Ext.define('KitchenSink.view.charts.radar.Filled', {\r | |
9 | extend: 'Ext.Panel',\r | |
10 | xtype: 'radar-filled',\r | |
11 | controller: 'radar-basic',\r | |
12 | // <example>\r | |
13 | // Content between example tags is omitted from code preview.\r | |
14 | otherContent: [{\r | |
15 | type: 'Controller',\r | |
16 | path: 'classic/samples/view/charts/radar/BasicController.js'\r | |
17 | }, {\r | |
18 | type: 'Store',\r | |
19 | path: 'classic/samples/store/Browsers.js'\r | |
20 | }],\r | |
21 | bodyStyle: 'background: transparent !important',\r | |
22 | layout: {\r | |
23 | type: 'vbox',\r | |
24 | pack: 'center'\r | |
25 | },\r | |
26 | // </example>\r | |
27 | \r | |
28 | width: 650,\r | |
29 | \r | |
30 | tbar: [\r | |
31 | '->',\r | |
32 | {\r | |
33 | text: 'Preview',\r | |
34 | handler: 'onPreview'\r | |
35 | }\r | |
36 | ],\r | |
37 | \r | |
38 | items: [{\r | |
39 | xtype: 'polar',\r | |
40 | reference: 'chart',\r | |
41 | width: '100%',\r | |
42 | height: 500,\r | |
43 | legend: {\r | |
44 | docked: 'right'\r | |
45 | },\r | |
46 | store: {\r | |
47 | type: 'browsers'\r | |
48 | },\r | |
49 | insetPadding: '40 40 60 40',\r | |
50 | interactions: ['rotate'],\r | |
51 | sprites: [{\r | |
52 | type: 'text',\r | |
53 | text: 'Radar Charts - Filled',\r | |
54 | fontSize: 22,\r | |
55 | width: 100,\r | |
56 | height: 30,\r | |
57 | x: 40, // the sprite x position\r | |
58 | y: 20 // the sprite y position\r | |
59 | }, {\r | |
60 | type: 'text',\r | |
61 | text: 'Data: Browser Stats 2012',\r | |
62 | fontSize: 10,\r | |
63 | x: 12,\r | |
64 | y: 480\r | |
65 | }, {\r | |
66 | type: 'text',\r | |
67 | text: 'Source: http://www.w3schools.com/',\r | |
68 | fontSize: 10,\r | |
69 | x: 12,\r | |
70 | y: 495\r | |
71 | }],\r | |
72 | axes: [{\r | |
73 | type: 'numeric',\r | |
74 | position: 'radial',\r | |
75 | fields: 'data1',\r | |
76 | grid: true,\r | |
77 | minimum: 0,\r | |
78 | maximum: 50,\r | |
79 | majorTickSteps: 4,\r | |
80 | renderer: 'onAxisLabelRender'\r | |
81 | }, {\r | |
82 | type: 'category',\r | |
83 | position: 'angular',\r | |
84 | grid: true\r | |
85 | }],\r | |
86 | series: [{\r | |
87 | type: 'radar',\r | |
88 | title: 'IE',\r | |
89 | angleField: 'month',\r | |
90 | radiusField: 'data1',\r | |
91 | style: {\r | |
92 | opacity: 0.40\r | |
93 | }\r | |
94 | }, {\r | |
95 | type: 'radar',\r | |
96 | title: 'Firefox',\r | |
97 | angleField: 'month',\r | |
98 | radiusField: 'data2',\r | |
99 | style: {\r | |
100 | opacity: 0.40\r | |
101 | }\r | |
102 | }, {\r | |
103 | type: 'radar',\r | |
104 | title: 'Chrome',\r | |
105 | angleField: 'month',\r | |
106 | radiusField: 'data3',\r | |
107 | style: {\r | |
108 | opacity: 0.40\r | |
109 | }\r | |
110 | }, {\r | |
111 | type: 'radar',\r | |
112 | title: 'Safari',\r | |
113 | angleField: 'month',\r | |
114 | radiusField: 'data4',\r | |
115 | style: {\r | |
116 | opacity: 0.40\r | |
117 | }\r | |
118 | }]\r | |
119 | //<example>\r | |
120 | }, {\r | |
121 | style: 'padding-top: 10px;',\r | |
122 | xtype: 'gridpanel',\r | |
123 | columns : {\r | |
124 | defaults: {\r | |
125 | sortable: false,\r | |
126 | menuDisabled: true,\r | |
127 | renderer: 'onDataRender'\r | |
128 | },\r | |
129 | items: [\r | |
130 | { text: '2012', dataIndex: 'month', renderer: Ext.identityFn },\r | |
131 | { text: 'IE', dataIndex: 'data1' },\r | |
132 | { text: 'Firefox', dataIndex: 'data2' },\r | |
133 | { text: 'Chrome', dataIndex: 'data3' },\r | |
134 | { text: 'Safari', dataIndex: 'data4' }\r | |
135 | ]\r | |
136 | },\r | |
137 | store: {\r | |
138 | type: 'browsers'\r | |
139 | },\r | |
140 | width: '100%'\r | |
141 | //</example>\r | |
142 | }]\r | |
143 | \r | |
144 | });\r |