]>
Commit | Line | Data |
---|---|---|
947f0963 TL |
1 | Ext.define('Portal.view.markets.Markets', { |
2 | extend: 'Ext.panel.Panel', | |
3 | ||
4 | xtype: 'markets', | |
5 | ||
6 | requires: [ | |
7 | 'Ext.data.JsonStore', | |
8 | 'Ext.chart.theme.Base', | |
9 | 'Ext.chart.series.Series', | |
10 | 'Ext.chart.series.Line', | |
11 | 'Ext.chart.axis.Numeric', | |
12 | 'Ext.chart.interactions.ItemHighlight' | |
13 | ], | |
14 | ||
15 | layout: 'fit', | |
16 | height: 300, | |
17 | items: Ext.supports.Canvas | |
18 | ? { | |
19 | xtype: 'chart', | |
20 | animate: false, | |
21 | shadow: false, | |
22 | store: { | |
23 | type: 'markets' | |
24 | }, | |
25 | legend: { | |
26 | position: 'bottom' | |
27 | }, | |
28 | axes: [{ | |
29 | type: 'numeric', | |
30 | position: 'left', | |
31 | fields: ['djia'], | |
32 | title: 'Dow Jones Average', | |
33 | label: { | |
34 | font: '11px Arial' | |
35 | } | |
36 | }, { | |
37 | type: 'numeric', | |
38 | position: 'right', | |
39 | grid: false, | |
40 | fields: ['sp500'], | |
41 | title: 'S&P 500', | |
42 | label: { | |
43 | font: '11px Arial' | |
44 | } | |
45 | }], | |
46 | series: [{ | |
47 | type: 'line', | |
48 | lineWidth: 1, | |
49 | fill: true, | |
50 | axis: 'left', | |
51 | xField: 'name', | |
52 | yField: 'djia', | |
53 | style: { | |
54 | 'stroke-width': 1, | |
55 | stroke: 'rgb(148, 174, 10)' | |
56 | } | |
57 | }, { | |
58 | type: 'line', | |
59 | lineWidth: 1, | |
60 | axis: 'right', | |
61 | xField: 'name', | |
62 | yField: 'sp500', | |
63 | style: { | |
64 | 'stroke-width': 1, | |
65 | stroke: 'rgb(17, 95, 166)' | |
66 | } | |
67 | }] | |
68 | } | |
69 | : { | |
70 | xtype: 'component', | |
71 | padding: '5', | |
72 | html: 'Advanced charting on this browser is not currently supported in this release.' | |
73 | } | |
74 | }); |