]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/column3d/Grouped.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / column3d / Grouped.js
CommitLineData
6527f429
DM
1/**\r
2 * Grouped 3D Columns are column charts where categories are grouped next to each\r
3 * other. This is typically done to visually represent the total of all categories for a\r
4 * given period or value.\r
5 */\r
6Ext.define('KitchenSink.view.charts.column3d.Grouped', {\r
7 extend: 'Ext.Panel',\r
8 xtype: 'column-grouped-3d',\r
9 requires: ['Ext.chart.theme.Muted'],\r
10 controller: 'column-grouped-3d',\r
11 // <example>\r
12 // Content between example tags is omitted from code preview.\r
13 bodyStyle: 'background: transparent !important',\r
14 layout: {\r
15 type: 'vbox',\r
16 pack: 'center'\r
17 },\r
18 otherContent: [{\r
19 type: 'Controller',\r
20 path: 'classic/samples/view/charts/column3d/GroupedController.js'\r
21 }, {\r
22 type: 'Store',\r
23 path: 'classic/samples/store/TwoYearSales.js'\r
24 }],\r
25 // </example>\r
26 width: 650,\r
27\r
28 items: [{\r
29 xtype: 'cartesian',\r
30 width: '100%',\r
31 height: 400,\r
32 theme: 'Muted',\r
33 insetPadding: '70 40 0 40',\r
34 interactions: ['itemhighlight'],\r
35 animation: {\r
36 duration: 200\r
37 },\r
38 store: {\r
39 type: 'two-year-sales'\r
40 },\r
41 legend: {\r
42 docked: 'bottom'\r
43 },\r
44 sprites: [{\r
45 type: 'text',\r
46 text: 'Sales in Last Two Years',\r
47 textAlign: 'center',\r
48 fontSize: 18,\r
49 fontWeight: 'bold',\r
50 width: 100,\r
51 height: 30,\r
52 x: 325, // the sprite x position\r
53 y: 30 // the sprite y position\r
54 }, {\r
55 type: 'text',\r
56 text: 'Quarter-wise comparison',\r
57 textAlign: 'center',\r
58 fontSize: 16,\r
59 x: 325,\r
60 y: 50\r
61 }, {\r
62 type: 'text',\r
63 text: 'Source: http://www.w3schools.com/',\r
64 fontSize: 10,\r
65 x: 12,\r
66 y: 495\r
67 }],\r
68 axes: [{\r
69 type: 'numeric3d',\r
70 position: 'left',\r
71 fields: ['2013', '2014'],\r
72 grid: true,\r
73 title: 'Sales in USD',\r
74 renderer: 'onAxisLabelRender'\r
75 }, {\r
76 type: 'category3d',\r
77 position: 'bottom',\r
78 fields: 'quarter',\r
79 title: {\r
80 text: 'Quarter',\r
81 translationX: -30\r
82 },\r
83 grid: true\r
84 }],\r
85 series: {\r
86 type: 'bar3d',\r
87 stacked: false,\r
88 title: ['Previous Year', 'Current Year'],\r
89 xField: 'quarter',\r
90 yField: ['2013', '2014'],\r
91 label: {\r
92 field: ['2013', '2014'],\r
93 display: 'insideEnd',\r
94 renderer: 'onSeriesLabelRender'\r
95 },\r
96 highlight: true,\r
97 style: {\r
98 inGroupGapWidth: -7\r
99 }\r
100 }\r
101 //<example>\r
102 }, {\r
103 style: 'margin-top: 10px;',\r
104 xtype: 'container',\r
105 layout: {\r
106 type: 'hbox',\r
107 pack: 'center'\r
108 },\r
109 width: '100%',\r
110 items: [{\r
111 xtype: 'gridpanel',\r
112 width: 300,\r
113 columns : {\r
114 defaults: {\r
115 sortable: false,\r
116 menuDisabled: true,\r
117 renderer: 'onGridColumnRender'\r
118 },\r
119 items: [\r
120 { text: 'Quarter', dataIndex: 'quarter', renderer: Ext.identityFn },\r
121 { text: '2013', dataIndex: '2013' },\r
122 { text: '2014', dataIndex: '2014' }\r
123 ]\r
124 },\r
125 store: {\r
126 type: 'two-year-sales'\r
127 }\r
128 }]\r
129 //</example>\r
130 }]\r
131\r
132});\r