]> git.proxmox.com Git - extjs.git/blame - extjs/examples/kitchensink/classic/samples/view/charts/bar3d/Stacked.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / charts / bar3d / Stacked.js
CommitLineData
6527f429
DM
1/**\r
2 * Stacked 3D bars are 3D bar charts where categories are stacked 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.bar3d.Stacked', {\r
7 extend: 'Ext.Panel',\r
8 xtype: 'bar-stacked-3d',\r
9 controller: 'bar-stacked-3d',\r
10\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/bar3d/StackedController.js'\r
21 }, {\r
22 type: 'Store',\r
23 path: 'classic/samples/store/Browsers.js'\r
24 }],\r
25 // </example>\r
26 width: 650,\r
27\r
28 initComponent: function() {\r
29 var me = this;\r
30 //<example>\r
31 me.tbar = [\r
32 '->',\r
33 {\r
34 text: 'Preview',\r
35 handler: 'onPreview'\r
36 }\r
37 ];\r
38 //</example>\r
39 me.items = [{\r
40 xtype: 'cartesian',\r
41 reference: 'chart',\r
42 theme: 'muted',\r
43 width: '100%',\r
44 height: 500,\r
45 legend: {\r
46 docked: 'right'\r
47 },\r
48 store: {type: 'browsers'},\r
49 insetPadding: 40,\r
50 flipXY: true,\r
51 animation: Ext.isIE8 ? false : {\r
52 easing: 'backOut',\r
53 duration: 500\r
54 },\r
55 sprites: [{\r
56 type: 'text',\r
57 text: 'Bar Charts - Stacked Bars',\r
58 fontSize: 22,\r
59 width: 100,\r
60 height: 30,\r
61 x: 40, // the sprite x position\r
62 y: 20 // the sprite y position\r
63 }, {\r
64 type: 'text',\r
65 text: 'Data: Browser Stats 2012',\r
66 fontSize: 10,\r
67 x: 12,\r
68 y: 480\r
69 }, {\r
70 type: 'text',\r
71 text: 'Source: http://www.w3schools.com/',\r
72 fontSize: 10,\r
73 x: 12,\r
74 y: 495\r
75 }],\r
76 axes: [{\r
77 type: 'numeric3d',\r
78 position: 'bottom',\r
79 adjustByMajorUnit: true,\r
80 grid: true,\r
81 renderer: 'onAxisLabelRender',\r
82 minimum: 0\r
83 }, {\r
84 type: 'category3d',\r
85 position: 'left',\r
86 grid: true\r
87 }],\r
88 series: [{\r
89 type: 'bar3d',\r
90 title: [ 'IE', 'Firefox', 'Chrome', 'Safari' ],\r
91 xField: 'month',\r
92 yField: [ 'data1', 'data2', 'data3', 'data4' ],\r
93 stacked: true,\r
94 highlight: true,\r
95 tooltip: {\r
96 trackMouse: true,\r
97 renderer: 'onSeriesTooltipRender'\r
98 }\r
99 }]\r
100 //<example>\r
101 }, {\r
102 style: 'margin-top: 10px;',\r
103 xtype: 'gridpanel',\r
104 columns : {\r
105 defaults: {\r
106 sortable: false,\r
107 menuDisabled: true,\r
108 renderer: 'onColumnRender'\r
109 },\r
110 items: [\r
111 { text: 'Month', dataIndex: 'month', renderer: Ext.identityFn },\r
112 { text: 'IE', dataIndex: 'data1' },\r
113 { text: 'Firefox', dataIndex: 'data2' },\r
114 { text: 'Chrome', dataIndex: 'data3' },\r
115 { text: 'Safari', dataIndex: 'data4' }\r
116 ]\r
117 },\r
118 store: {type: 'browsers'},\r
119 width: '100%'\r
120 //</example>\r
121 }];\r
122\r
123 this.callParent();\r
124 }\r
125});\r