]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/column/Stacked100.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / column / Stacked100.js
CommitLineData
6527f429
DM
1/**\r
2 * 100% stacked 3D columns are column charts where categories are stacked\r
3 * on top of each other. The value of each category is recalculated, so that\r
4 * it represents a share of the whole, which is the full stack and is equal\r
5 * to 100 by default.\r
6 */\r
7Ext.define('KitchenSink.view.charts.column.Stacked100', {\r
8 extend: 'Ext.Panel',\r
9 xtype: 'column-stacked-100',\r
10 controller: 'column-stacked-100',\r
11 requires: ['Ext.chart.theme.Muted'],\r
12 // <example>\r
13 // Content between example tags is omitted from code preview.\r
14 bodyStyle: 'background: transparent !important',\r
15 layout: {\r
16 type: 'vbox',\r
17 pack: 'center'\r
18 },\r
19 otherContent: [{\r
20 type: 'Controller',\r
21 path: 'classic/samples/view/charts/column/Stacked100Controller.js'\r
22 }, {\r
23 type: 'Store',\r
24 path: 'classic/samples/store/Cars.js'\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: 'cartesian',\r
40 reference: 'chart',\r
41\r
42 width: '100%',\r
43 height: 460,\r
44\r
45 legend: {\r
46 docked: 'bottom'\r
47 },\r
48 store: {\r
49 type: 'cars'\r
50 },\r
51 theme: 'Muted',\r
52\r
53 insetPadding: {\r
54 top: 40,\r
55 left: 40,\r
56 right: 40,\r
57 bottom: 40\r
58 },\r
59 sprites: [{\r
60 type: 'text',\r
61 text: 'Car production by largest manufacturers',\r
62 fontSize: 22,\r
63 width: 100,\r
64 height: 30,\r
65 x: 40, // the sprite x position\r
66 y: 20 // the sprite y position\r
67 }, {\r
68 type: 'text',\r
69 text: 'Source: International Organization of Motor Vehicle Manufacturers',\r
70 fontSize: 10,\r
71 x: 12,\r
72 y: 395\r
73 }],\r
74 axes: [{\r
75 type: 'numeric',\r
76 position: 'left',\r
77 grid: true,\r
78 fields: [ 'to', 'gm', 'vw', 'hy', 'fo' ],\r
79 renderer: 'onAxisLabelRender'\r
80 }, {\r
81 type: 'category',\r
82 position: 'bottom',\r
83 fields: 'year',\r
84 label: {\r
85 rotate: {\r
86 degrees: -45\r
87 }\r
88 }\r
89 }],\r
90 series: [{\r
91 type: 'bar',\r
92 stacked: true,\r
93 fullStack: true,\r
94\r
95 title: [ 'Toyota', 'GM', 'Volkswagen', 'Hyundai', 'Ford' ],\r
96\r
97 xField: 'year',\r
98 yField: [ 'to', 'gm', 'vw', 'hy', 'fo' ],\r
99\r
100 style: {\r
101 minGapWidth: 30\r
102 },\r
103 highlight: {\r
104 fillStyle: 'yellow'\r
105 },\r
106 tooltip: {\r
107 trackMouse: true,\r
108 renderer: 'onBarTipRender'\r
109 }\r
110 }]\r
111 //<example>\r
112 }, {\r
113 style: 'margin-top: 10px;',\r
114 xtype: 'gridpanel',\r
115 columns : {\r
116 defaults: {\r
117 sortable: false,\r
118 menuDisabled: true\r
119 },\r
120 items: [\r
121 { text: 'Year', dataIndex: 'year' },\r
122 { text: 'Toyota', dataIndex: 'to' },\r
123 { text: 'GM', dataIndex: 'gm' },\r
124 { text: 'Volkswagen', dataIndex: 'vw' },\r
125 { text: 'Hyundai', dataIndex: 'hy' },\r
126 { text: 'Ford', dataIndex: 'fo' }\r
127 ]\r
128 },\r
129 store: {\r
130 type: 'cars'\r
131 },\r
132 width: '100%'\r
133 //</example>\r
134 }]\r
135\r
136});\r