]>
git.proxmox.com Git - sencha-touch.git/blob - src/examples/kitchensink/app/view/CandlestickChart.js
2 * Demonstrates how to use Ext.chart.series.CandleStick
5 Ext
.define('Kitchensink.view.CandlestickChart', {
9 'Ext.chart.series.Line',
10 'Ext.chart.axis.Numeric',
11 'Ext.chart.axis.Time',
12 'Ext.chart.series.CandleStick'
33 handler: function () {
34 //ensure the query gets the chart for this kitchensink example
35 var chart
= Ext
.ComponentQuery
.query('chart', this.getParent().getParent())[0];
38 Ext
.ComponentQuery
.query('axis', chart
)[1].setVisibleRange([0, 0.3]);
51 zoomOnPanGesture
: false,
80 fill
: 'rgb(237,123,43)',
81 stroke
: 'rgb(237,123,43)'
84 fill
: 'rgb(55,153,19)',
85 stroke
: 'rgb(55,153,19)'
96 fields
: ['open', 'high', 'low', 'close'],
105 visibleRange
: [0, 0.3],
114 initialize: function () {
116 var toolbar
= Ext
.ComponentQuery
.query('toolbar', this)[0],
117 interactions
= Ext
.ComponentQuery
.query('interaction', this),
118 panzoom
= interactions
[0],
119 crosshair
= interactions
[1];
122 xtype
: 'segmentedbutton',
128 handler: function () {
129 crosshair
.setEnabled(true);
130 panzoom
.setEnabled(false);
135 handler: function () {
136 panzoom
.setEnabled(true);
137 crosshair
.setEnabled(false);
142 if (toolbar
&& panzoom
&& !panzoom
.isMultiTouch()) {
143 toolbar
.add(panzoom
.getModeToggleButton());