]>
Commit | Line | Data |
---|---|---|
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 | |
7 | Ext.define('KitchenSink.view.charts.column3d.Stacked100', {\r | |
8 | extend: 'Ext.Panel',\r | |
9 | xtype: 'column-stacked-100-3d',\r | |
10 | requires: ['Ext.chart.theme.Muted'],\r | |
11 | controller: 'column-stacked-100-3d',\r | |
12 | // <example>\r | |
13 | // Content between example tags is omitted from code preview.\r | |
14 | bodyStyle: 'background: transparent !important',\r | |
15 | otherContent: [{\r | |
16 | type: 'Controller',\r | |
17 | path: 'classic/samples/view/charts/column3d/Stacked100Controller.js'\r | |
18 | }, {\r | |
19 | type: 'Store',\r | |
20 | path: 'classic/samples/store/Browsers.js'\r | |
21 | }],\r | |
22 | layout: {\r | |
23 | type: 'vbox',\r | |
24 | pack: 'center'\r | |
25 | },\r | |
26 | // </example>\r | |
27 | width: 650,\r | |
28 | \r | |
29 | items: [{\r | |
30 | xtype: 'cartesian',\r | |
31 | reference: 'chart',\r | |
32 | interactions: ['itemhighlight'],\r | |
33 | width: '100%',\r | |
34 | height: 460,\r | |
35 | insetPadding: 40,\r | |
36 | innerPadding: '0 3 0 0',\r | |
37 | theme: 'Muted',\r | |
38 | legend: {\r | |
39 | docked: 'bottom'\r | |
40 | },\r | |
41 | store: {\r | |
42 | type: 'browsers'\r | |
43 | },\r | |
44 | animation: Ext.isIE8 ? false : {\r | |
45 | easing: 'backOut',\r | |
46 | duration: 500\r | |
47 | },\r | |
48 | axes: [{\r | |
49 | type: 'numeric3d',\r | |
50 | position: 'left',\r | |
51 | grid: true,\r | |
52 | fields: ['data1', 'data2', 'data3', 'data4', 'other' ],\r | |
53 | renderer: 'onAxisLabelRender',\r | |
54 | minimum: 0,\r | |
55 | maximum: 100\r | |
56 | }, {\r | |
57 | type: 'category3d',\r | |
58 | position: 'bottom',\r | |
59 | grid: true,\r | |
60 | fields: ['month'],\r | |
61 | label: {\r | |
62 | rotate: {\r | |
63 | degrees: -45\r | |
64 | }\r | |
65 | }\r | |
66 | }],\r | |
67 | series: [{\r | |
68 | type: 'bar3d',\r | |
69 | fullStack: true,\r | |
70 | title: [ 'IE', 'Firefox', 'Chrome', 'Safari', 'Others' ],\r | |
71 | xField: 'month',\r | |
72 | yField: [ 'data1', 'data2', 'data3', 'data4', 'other' ],\r | |
73 | stacked: true,\r | |
74 | highlightCfg: {\r | |
75 | brightnessFactor: 1.2,\r | |
76 | saturationFactor: 1.5\r | |
77 | },\r | |
78 | tooltip: {\r | |
79 | trackMouse: true,\r | |
80 | renderer: 'onTooltipRender'\r | |
81 | }\r | |
82 | }],\r | |
83 | sprites: [{\r | |
84 | type: 'text',\r | |
85 | text: 'Usage share of desktop browsers',\r | |
86 | fontSize: 22,\r | |
87 | width: 100,\r | |
88 | height: 30,\r | |
89 | x: 40, // the sprite x position\r | |
90 | y: 20 // the sprite y position\r | |
91 | }, {\r | |
92 | type: 'text',\r | |
93 | text: 'Data: Browser Stats 2012',\r | |
94 | fontSize: 10,\r | |
95 | x: 12,\r | |
96 | y: 380\r | |
97 | }, {\r | |
98 | type: 'text',\r | |
99 | text: 'Source: http://www.w3schools.com/',\r | |
100 | fontSize: 10,\r | |
101 | x: 12,\r | |
102 | y: 395\r | |
103 | }]\r | |
104 | }],\r | |
105 | \r | |
106 | tbar: [\r | |
107 | '->',\r | |
108 | {\r | |
109 | text: 'Preview',\r | |
110 | handler: 'onPreview'\r | |
111 | }\r | |
112 | ]\r | |
113 | });\r |