]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * This example shows how to use multiple floating axes in a polar chart. Similar to the\r | |
3 | * Plot Line Chart example, floating axes don't have a fixed position, instead they track\r | |
4 | * a specified value on another axis that is running in the opposite direction.\r | |
5 | *\r | |
6 | * The example makes use of the 'rotate' interaction. To use it, click or tap and then\r | |
7 | * drag anywhere on the chart.\r | |
8 | */\r | |
9 | Ext.define('KitchenSink.view.charts.radar.MultiAxis', {\r | |
10 | extend: 'Ext.Panel',\r | |
11 | xtype: 'radar-multi-axis',\r | |
12 | controller: 'radar-basic',\r | |
13 | // <example>\r | |
14 | // Content between example tags is omitted from code preview.\r | |
15 | otherContent: [{\r | |
16 | type: 'Controller',\r | |
17 | path: 'classic/samples/view/charts/radar/BasicController.js'\r | |
18 | }, {\r | |
19 | type: 'Store',\r | |
20 | path: 'classic/samples/store/Climate.js'\r | |
21 | }],\r | |
22 | layout: 'vbox',\r | |
23 | // </example>\r | |
24 | \r | |
25 | width: 650,\r | |
26 | \r | |
27 | tbar: [\r | |
28 | '->',\r | |
29 | {\r | |
30 | text: 'Refresh',\r | |
31 | handler: 'onRefresh'\r | |
32 | },\r | |
33 | {\r | |
34 | text: 'Preview',\r | |
35 | handler: 'onPreview'\r | |
36 | }\r | |
37 | ],\r | |
38 | \r | |
39 | items: {\r | |
40 | xtype: 'polar',\r | |
41 | reference: 'chart',\r | |
42 | width: '100%',\r | |
43 | height: 500,\r | |
44 | insetPadding: 20,\r | |
45 | innerPadding: 40,\r | |
46 | store: {\r | |
47 | type: 'climate'\r | |
48 | },\r | |
49 | interactions: 'rotate',\r | |
50 | axes: [\r | |
51 | {\r | |
52 | type: 'category',\r | |
53 | position: 'angular',\r | |
54 | id: 'main-angular-axis',\r | |
55 | grid: true,\r | |
56 | style: {\r | |
57 | majorTickSize: 20,\r | |
58 | strokeStyle: 'rgb(73,112,142)'\r | |
59 | }\r | |
60 | },\r | |
61 | {\r | |
62 | type: 'category',\r | |
63 | position: 'angular',\r | |
64 | linkedTo: 'main-angular-axis',\r | |
65 | renderer: 'onMultiAxisLabelRender',\r | |
66 | floating: {\r | |
67 | value: 20,\r | |
68 | alongAxis: 'radial-axis'\r | |
69 | }\r | |
70 | },\r | |
71 | {\r | |
72 | type: 'numeric',\r | |
73 | id: 'radial-axis',\r | |
74 | position: 'radial',\r | |
75 | label: {\r | |
76 | fontWeight: 'bold'\r | |
77 | },\r | |
78 | floating: {\r | |
79 | value: 'Jan',\r | |
80 | alongAxis: 'main-angular-axis'\r | |
81 | }\r | |
82 | }\r | |
83 | ],\r | |
84 | series: [{\r | |
85 | type: 'radar',\r | |
86 | angleField: 'month',\r | |
87 | radiusField: 'high',\r | |
88 | style: {\r | |
89 | globalAlpha: 0.7\r | |
90 | }\r | |
91 | }]\r | |
92 | }\r | |
93 | \r | |
94 | });\r |