]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/bar3d/Basic.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / bar3d / Basic.js
CommitLineData
6527f429
DM
1/**\r
2 * A basic 3D bar chart is a chart with horizontal bars of lengths proportional to the\r
3 * magnitudes of the data it represents. Basic 3D bars can be used in the same manner as the\r
4 * 3D column charts. Categories are typically organized along the vertical axis and values\r
5 * along the horizontal axis. Tapping or hovering a bar will highlight it.\r
6 */\r
7Ext.define('KitchenSink.view.charts.bar3d.Basic', {\r
8 extend: 'Ext.Panel',\r
9 xtype: 'bar-basic-3d',\r
10 controller: 'bar-basic-3d',\r
11\r
12 requires: [\r
13 'Ext.chart.theme.Muted'\r
14 ],\r
15\r
16 // <example>\r
17 // Content between example tags is omitted from code preview.\r
18 bodyStyle: 'background: transparent !important',\r
19 layout: {\r
20 type: 'vbox',\r
21 pack: 'center'\r
22 },\r
23 otherContent: [{\r
24 type: 'Controller',\r
25 path: 'classic/samples/view/charts/bar3d/BasicController.js'\r
26 }, {\r
27 type: 'Store',\r
28 path: 'classic/samples/store/EconomySectors.js'\r
29 }],\r
30 // </example>\r
31 width: 650,\r
32\r
33 items: [{\r
34 xtype: 'cartesian',\r
35 flipXY: true,\r
36 reference: 'chart',\r
37 width: '100%',\r
38 height: 500,\r
39 insetPadding: '40 40 30 40',\r
40 innerPadding: '3 0 0 0',\r
41 theme: {\r
42 type: 'muted'\r
43 },\r
44 store: {\r
45 type: 'economy-sectors'\r
46 },\r
47 animation: {\r
48 easing: 'easeOut',\r
49 duration: 500\r
50 },\r
51 interactions: ['itemhighlight'],\r
52 axes: [{\r
53 type: 'numeric3d',\r
54 position: 'bottom',\r
55 fields: 'ind',\r
56 maximum: 4000000,\r
57 majorTickSteps: 10,\r
58 renderer: 'onAxisLabelRender',\r
59 title: 'Billions of USD',\r
60 grid: {\r
61 odd: {\r
62 fillStyle: 'rgba(245, 245, 245, 1.0)'\r
63 },\r
64 even: {\r
65 fillStyle: 'rgba(255, 255, 255, 1.0)'\r
66 }\r
67 }\r
68 }, {\r
69 type: 'category3d',\r
70 position: 'left',\r
71 fields: 'country',\r
72 label: {\r
73 textAlign: 'right'\r
74 },\r
75 grid: true\r
76 }],\r
77 series: [{\r
78 type: 'bar3d',\r
79 xField: 'country',\r
80 yField: 'ind',\r
81 style: {\r
82 minGapWidth: 10\r
83 },\r
84 highlight: true,\r
85 label: {\r
86 field: 'ind',\r
87 display: 'insideEnd',\r
88 renderer: 'onSeriesLabelRender'\r
89 },\r
90 tooltip: {\r
91 trackMouse: true,\r
92 renderer: 'onSeriesTooltipRender'\r
93 }\r
94 }],\r
95 sprites: [{\r
96 type: 'text',\r
97 text: 'Industry size in major economies (2011)',\r
98 fontSize: 22,\r
99 width: 100,\r
100 height: 30,\r
101 x: 40, // the sprite x position\r
102 y: 20 // the sprite y position\r
103 }, {\r
104 type: 'text',\r
105 text: 'Source: http://en.wikipedia.org/wiki/List_of_countries_by_GDP_sector_composition',\r
106 fontSize: 10,\r
107 x: 12,\r
108 y: 490\r
109 }]\r
110 }],\r
111\r
112 tbar: [\r
113 '->',\r
114 {\r
115 text: 'Preview',\r
116 handler: 'onPreview'\r
117 }\r
118 ]\r
119\r
120});\r