]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/radar/Marked.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / radar / Marked.js
CommitLineData
6527f429
DM
1/**\r
2 * Multi-series radar chart displaying trends across multiple categories.\r
3 * Markers are placed at each point to clearly depict their position.\r
4 *\r
5 * The example makes use of the 'rotate' interaction. To use it, click or tap and then\r
6 * drag anywhere on the chart.\r
7 */\r
8Ext.define('KitchenSink.view.charts.radar.Marked', {\r
9 extend: 'Ext.Panel',\r
10 xtype: 'radar-marked',\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 animation: {\r
47 duration: 200\r
48 },\r
49 store: {\r
50 type: 'browsers'\r
51 },\r
52 insetPadding: '40 40 60 40',\r
53 interactions: ['rotate'],\r
54 sprites: [{\r
55 type: 'text',\r
56 text: 'Radar Charts - Marked',\r
57 fontSize: 22,\r
58 width: 100,\r
59 height: 30,\r
60 x: 40, // the sprite x position\r
61 y: 20 // the sprite y position\r
62 }, {\r
63 type: 'text',\r
64 text: 'Data: Browser Stats 2012',\r
65 fontSize: 10,\r
66 x: 12,\r
67 y: 480\r
68 }, {\r
69 type: 'text',\r
70 text: 'Source: http://www.w3schools.com/',\r
71 fontSize: 10,\r
72 x: 12,\r
73 y: 495\r
74 }],\r
75 axes: [{\r
76 type: 'numeric',\r
77 position: 'radial',\r
78 minimum: 0,\r
79 maximum: 50,\r
80 majorTickSteps: 9\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 lineWidth: 2,\r
93 fillStyle: 'none'\r
94 },\r
95 marker: true,\r
96 highlightCfg: {\r
97 radius: 6,\r
98 fillStyle: 'yellow'\r
99 },\r
100 tooltip: {\r
101 trackMouse: true,\r
102 renderer: 'onSeriesLabelRender'\r
103 }\r
104 }, {\r
105 type: 'radar',\r
106 title: 'Firefox',\r
107 angleField: 'month',\r
108 radiusField: 'data2',\r
109 style: {\r
110 lineWidth: 2,\r
111 fillStyle: 'none'\r
112 },\r
113 marker: true,\r
114 highlightCfg: {\r
115 radius: 6,\r
116 fillStyle: 'yellow'\r
117 },\r
118 tooltip: {\r
119 trackMouse: true,\r
120 renderer: 'onSeriesLabelRender'\r
121 }\r
122 }, {\r
123 type: 'radar',\r
124 title: 'Chrome',\r
125 angleField: 'month',\r
126 radiusField: 'data3',\r
127 style: {\r
128 lineWidth: 2,\r
129 fillStyle: 'none'\r
130 },\r
131 marker: true,\r
132 highlightCfg: {\r
133 radius: 6,\r
134 fillStyle: 'yellow'\r
135 },\r
136 tooltip: {\r
137 trackMouse: true,\r
138 renderer: 'onSeriesLabelRender'\r
139 }\r
140 }, {\r
141 type: 'radar',\r
142 title: 'Safari',\r
143 angleField: 'month',\r
144 radiusField: 'data4',\r
145 style: {\r
146 lineWidth: 2,\r
147 fillStyle: 'none'\r
148 }\r
149 }]\r
150 //<example>\r
151 }, {\r
152 style: 'padding-top: 10px;',\r
153 xtype: 'gridpanel',\r
154 columns : {\r
155 defaults: {\r
156 sortable: false,\r
157 menuDisabled: true,\r
158 renderer: 'onDataRender'\r
159 },\r
160 items: [\r
161 { text: '2012', dataIndex: 'month', renderer: Ext.identityFn },\r
162 { text: 'IE', dataIndex: 'data1' },\r
163 { text: 'Firefox', dataIndex: 'data2' },\r
164 { text: 'Chrome', dataIndex: 'data3' },\r
165 { text: 'Safari', dataIndex: 'data4' }\r
166 ]\r
167 },\r
168 store: {\r
169 type: 'browsers'\r
170 },\r
171 width: '100%'\r
172 //</example>\r
173 }]\r
174\r
175});\r