]> git.proxmox.com Git - extjs.git/blame - extjs/build/examples/kitchensink/classic/samples/view/charts/column/Basic.js
bump version to 7.0.0-4
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / column / Basic.js
CommitLineData
947f0963
TL
1/**
2 * The Basic Column Chart displays a set of random data in a column series. The "Reload Data"
3 * button will randomly generate a new set of data in the store.
4 *
5 * Tapping or hovering a column will highlight it.
6 * Dragging a column will change the underlying data.
7 * Try dragging below 65 degrees Fahrenheit.
8 */
9Ext.define('KitchenSink.view.charts.column.Basic', {
10 extend: 'Ext.Panel',
11 xtype: 'column-basic',
12 controller: 'column-basic',
13 //<example>
14 // Content between example tags is omitted from code preview.
15 bodyStyle: 'background: transparent !important',
16 layout: 'fit',
17 otherContent: [{
18 type: 'Controller',
19 path: 'classic/samples/view/charts/column/BasicController.js'
20 }, {
21 type: 'Store',
22 path: 'app/store/Climate.js'
23 }],
24 //</example>
25 width: 650,
26 height: 500,
27
28 tbar: [
29 '->',
30 {
31 text: 'Preview',
32 platformConfig: {
33 desktop: {
34 text: 'Download'
35 }
36 },
37 handler: 'onDownload'
38 },
39 {
40 text: 'Reload Data',
41 handler: 'onReloadData'
42 }
43 ],
44
45 items: {
46 xtype: 'cartesian',
47 reference: 'chart',
48 captions: {
49 title: {
50 text: 'Redwood City Climate Data',
51 align: 'left'
52 }
53 },
54 store: {
55 type: 'climate'
56 },
57 downloadServerUrl: '//svg.sencha.io',
58 interactions: {
59 type: 'itemedit',
60 tooltip: {
61 renderer: 'onEditTipRender'
62 },
63 renderer: 'onColumnEdit'
64 },
65 axes: [{
66 type: 'numeric',
67 position: 'left',
68 minimum: 30,
69 titleMargin: 20,
70 title: {
71 text: 'Temperature in °F'
72 },
73 listeners: {
74 rangechange: 'onAxisRangeChange'
75 }
76 }, {
77 type: 'category',
78 position: 'bottom'
79 }],
80 animation: Ext.isIE8 ? false : true,
81 series: {
82 type: 'bar',
83 xField: 'month',
84 yField: 'highF',
85 style: {
86 minGapWidth: 20
87 },
88 highlight: {
89 strokeStyle: 'black',
90 fillStyle: 'gold'
91 },
92 label: {
93 field: 'highF',
94 display: 'insideEnd',
95 renderer: 'onSeriesLabelRender'
96 }
97 },
98 listeners: {
99 afterrender: 'onAfterRender',
100 beginitemedit: 'onBeginItemEdit',
101 enditemedit: 'onEndItemEdit'
102 }
103 }
104
105});