]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/scatter/Bubble.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / scatter / Bubble.js
CommitLineData
6527f429
DM
1/**\r
2 * Demonstrates how to make a bubble chart using Ext.chart.series.Scatter\r
3 *\r
4 * Bubble charts, similarly to Line charts, allow to visualize the evolution of a\r
5 * parameter over time or the ratio between any two parameters, but in addition they\r
6 * can also display intrinsic values of these parameters by assigning them to the\r
7 * diameter or the color of the bubbles.\r
8 */\r
9Ext.define('KitchenSink.view.charts.scatter.Bubble', {\r
10 extend: 'Ext.Panel',\r
11 xtype: 'scatter-bubble',\r
12 controller: 'scatter-bubble',\r
13 // <example>\r
14 otherContent: [{\r
15 type: 'Controller',\r
16 path: 'classic/samples/view/charts/scatter/BubbleController.js'\r
17 }],\r
18 // </example>\r
19\r
20 requires: [\r
21 'Ext.draw.Color',\r
22 'Ext.chart.CartesianChart',\r
23 'Ext.chart.series.Scatter',\r
24 'Ext.chart.axis.Numeric',\r
25 'Ext.chart.interactions.*'\r
26 ],\r
27\r
28 layout: 'fit',\r
29 width: 650,\r
30\r
31 tbar: [\r
32 '->',\r
33 {\r
34 text: 'Refresh',\r
35 handler: 'onRefresh'\r
36 },\r
37 {\r
38 text: 'Drop all bubbles',\r
39 handler: 'onDropBubble'\r
40 }\r
41 ],\r
42\r
43 items: [{\r
44 xtype: 'cartesian',\r
45 reference: 'chart',\r
46 background: '#242021',\r
47\r
48 width: '100%',\r
49 height: 500,\r
50 insetPadding: 20,\r
51\r
52 store: {\r
53 fields: [ 'x', 'g1', 'g2', 'g3', 'g4', 'g5' ]\r
54 },\r
55\r
56 interactions: {\r
57 type: 'itemedit',\r
58 tooltip: {\r
59 renderer: 'onEditTipRender'\r
60 }\r
61 },\r
62\r
63 series: {\r
64 type: 'scatter',\r
65 xField: 'x',\r
66 yField: 'g2',\r
67 highlightCfg: {\r
68 scale: 1.3\r
69 },\r
70 marker: {\r
71 type: 'circle',\r
72 radius: 5,\r
73 fillStyle: 'rgb(203,143,203)',\r
74 miterLimit: 1,\r
75 lineCap: 'butt',\r
76 lineWidth: 1,\r
77 fx: {\r
78 duration: 200\r
79 }\r
80 },\r
81 style: {\r
82 renderer: 'onItemRender'\r
83 }\r
84 },\r
85 axes: [{\r
86 type: 'numeric',\r
87 position: 'left',\r
88 fields: 'g2',\r
89 minimum: 0,\r
90 style: {\r
91 majorTickSize: 10,\r
92 lineWidth: 3,\r
93 stroke: '#888',\r
94 estStepSize: 50\r
95 },\r
96 label: {\r
97 color: '#888',\r
98 fontFamily: 'Chalkboard, sans-serif',\r
99 fontSize: 20\r
100 },\r
101 grid: {\r
102 stroke: '#444',\r
103 odd: {\r
104 fill: '#333'\r
105 }\r
106 }\r
107 }, {\r
108 type: 'numeric',\r
109 position: 'bottom',\r
110 fields: 'x',\r
111 minimum: 0,\r
112 maximum: 50,\r
113 style: {\r
114 majorTickSize: 10,\r
115 lineWidth: 3,\r
116 stroke: '#888',\r
117 estStepSize: 100\r
118 },\r
119 label: {\r
120 color: '#888',\r
121 fontFamily: 'Chalkboard, sans-serif',\r
122 fontSize: 20\r
123 },\r
124 grid: {\r
125 stroke: '#444'\r
126 }\r
127 }],\r
128\r
129 listeners: {\r
130 afterrender: 'onAfterRender'\r
131 }\r
132 }]\r
133});\r