]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/column3d/Renderer.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / column3d / Renderer.js
CommitLineData
6527f429
DM
1/**\r
2 * This example shows how to use a 3D column chart with a renderer\r
3 * to alter the look of individual columns in the series based on\r
4 * certain criteria (in this case column index).\r
5 */\r
6Ext.define('KitchenSink.view.charts.column3d.Renderer', {\r
7 extend: 'Ext.Panel',\r
8 xtype: 'column-renderer-3d',\r
9 controller: 'column-renderer-3d',\r
10 requires: ['Ext.chart.theme.Muted'],\r
11\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/column3d/RendererController.js'\r
22 }, {\r
23 type: 'Store',\r
24 path: 'classic/samples/store/Browsers.js'\r
25 }],\r
26 // </example>\r
27 width: 650,\r
28\r
29 items: [{\r
30 xtype: 'cartesian',\r
31 width: '100%',\r
32 height: 500,\r
33 interactions: {\r
34 type: 'panzoom',\r
35 zoomOnPanGesture: true\r
36 },\r
37 store: {\r
38 type: 'browsers'\r
39 },\r
40 theme: {\r
41 type: 'muted'\r
42 },\r
43 insetPadding: '60 40 40 40',\r
44 innerPadding: '0 4 0 3',\r
45 axes: [{\r
46 type: 'numeric3d',\r
47 fields: 'data3',\r
48 position: 'left',\r
49 grid: true,\r
50 renderer: 'onAxisLabelRender'\r
51 }, {\r
52 type: 'category',\r
53 fields: 'month',\r
54 position: 'bottom',\r
55 grid: true,\r
56 label: {\r
57 rotate: {\r
58 degrees: -45\r
59 }\r
60 },\r
61 visibleRange: [0, 0.75]\r
62 }],\r
63 series: [{\r
64 type: 'bar3d',\r
65 xField: 'month',\r
66 yField: 'data3',\r
67 label: {\r
68 field: 'data3',\r
69 display: 'over'\r
70 },\r
71 highlight: {\r
72 fillStyle: 'rgba(43, 130, 186, 1.0)',\r
73 strokeStyle: 'brown',\r
74 showStroke: true,\r
75 lineWidth: 2\r
76 },\r
77 tooltip: {\r
78 trackMouse: true,\r
79 showDelay: 0,\r
80 dismissDelay: 0,\r
81 hideDelay: 0,\r
82 renderer: 'onTooltipRender'\r
83 },\r
84 renderer: 'onColumnRender'\r
85\r
86 }],\r
87 sprites: [{\r
88 type: 'text',\r
89 text: 'Renderer assigns a unique color to each column in a series',\r
90 fontSize: 22,\r
91 width: 100,\r
92 height: 30,\r
93 x: 40, // the sprite x position\r
94 y: 40 // the sprite y position\r
95 }, {\r
96 type: 'text',\r
97 text: 'Data: Google Chrome marker share in 2012 (Browser Stats)',\r
98 fontSize: 10,\r
99 x: 12,\r
100 y: 470\r
101 }, {\r
102 type: 'text',\r
103 text: 'Source: http://www.w3schools.com/',\r
104 fontSize: 10,\r
105 x: 12,\r
106 y: 485\r
107 }]\r
108 }]\r
109\r
110});