]> git.proxmox.com Git - extjs.git/blame - extjs/examples/kitchensink/classic/samples/view/charts/bar/BasicController.js
bump version to 7.0.0-4
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / charts / bar / BasicController.js
CommitLineData
947f0963
TL
1Ext.define('KitchenSink.view.charts.bar.BasicController', {
2 extend: 'Ext.app.ViewController',
3 alias: 'controller.bar-basic',
4
5 onAxisLabelRender: function(axis, label, layoutContext) {
6 return Ext.util.Format.number(layoutContext.renderer(label) / 1000, '0,000');
7 },
8
9 onSeriesLabelRender: function(v) {
10 return Ext.util.Format.number(v / 1000, '0,000');
11 },
12
13 onItemEditTooltipRender: function(tooltip, item, target, e) {
14 var formatString = '0,000 (billions of USD)',
15 record = item.record;
16
17 tooltip.setHtml(record.get('country') + ': ' +
18 Ext.util.Format.number(target.yValue / 1000, formatString));
19 },
20
21 onSeriesTooltipRender: function(tooltip, record, item) {
22 var formatString = '0,000 (millions of USD)';
23
24 tooltip.setHtml(record.get('country') + ': ' +
25 Ext.util.Format.number(record.get('ind'), formatString));
26 },
27
28 onColumnRender: function(v) {
29 return Ext.util.Format.usMoney(v * 1000);
30 },
31
32 onPreview: function() {
33 var chart;
34
35 if (Ext.isIE8) {
36 Ext.Msg.alert('Unsupported Operation', 'This operation requires a newer version of Internet Explorer.');
37
38 return;
39 }
40
41 chart = this.lookup('chart');
42
43 chart.preview();
44 }
45
46});