]>
git.proxmox.com Git - sencha-touch.git/blob - src/examples/kitchensink/app/view/LineChartWithMarker.js
2 * Demonstrates how to use Ext.chart.series.Line with Markers
5 Ext
.define('Kitchensink.view.LineChartWithMarker', {
7 requires
: ['Ext.chart.Chart', 'Ext.chart.series.Line', 'Ext.chart.axis.Numeric', 'Ext.draw.modifier.Highlight',
8 'Ext.chart.axis.Time', 'Ext.chart.interactions.ItemHighlight'],
29 handler: function (a
, b
, c
, d
, e
) {
30 Ext
.getStore('Pie').generateData(10);
35 handler: function () {
36 //ensure the query gets the chart for this kitchensink example
37 var chart
= Ext
.ComponentQuery
.query('chart', this.getParent().getParent())[0];
40 Ext
.ComponentQuery
.query('axis', chart
)[0].setVisibleRange([0, 1]);
41 Ext
.ComponentQuery
.query('axis', chart
)[1].setVisibleRange([0, 0.5]);
45 chart
.resetLegendStore();
57 zoomOnPanGesture
: false
71 stroke
: 'rgb(143,203,203)',
72 fill
: 'rgba(143,203,203,0.3)',
85 src
: 'glyphicons_094_vector_path_square.png',
101 stroke
: 'rgb(143,203,203)',
113 src
: 'glyphicons_095_vector_path_circle.png',
129 stroke
: 'rgb(143,203,203)',
140 src
: 'glyphicons_096_vector_path_polygon.png',
156 fields
: ['g1', 'g2', 'g3'],
162 visibleRange
: [0, 0.5],
169 initialize: function () {
171 Ext
.getStore('Pie').generateData(10);
172 var toolbar
= Ext
.ComponentQuery
.query('toolbar', this)[0],
173 interaction
= Ext
.ComponentQuery
.query('interaction', this)[0];
174 if (toolbar
&& interaction
&& !interaction
.isMultiTouch()) {
175 toolbar
.add(interaction
.getModeToggleButton());