]> git.proxmox.com Git - extjs.git/blob - extjs/build/examples/kitchensink/classic/samples/view/charts/column3d/BasicController.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / classic / samples / view / charts / column3d / BasicController.js
1 Ext.define('KitchenSink.view.charts.column3d.BasicController', {
2 extend: 'Ext.app.ViewController',
3 alias: 'controller.column-basic-3d',
4
5 onDownload: function () {
6 var chart = this.lookupReference('chart');
7
8 if (Ext.os.is.Desktop) {
9 chart.download({
10 filename: 'Industry size in major economies for 2011'
11 });
12 } else {
13 chart.preview();
14 }
15 },
16
17 onSeriesLabelRender: function (v) {
18 return Ext.util.Format.number(v / 1000, '0,000');
19 },
20
21 onTooltipRender: function (tooltip, record, item) {
22 tooltip.setHtml(record.get('country') + ': ' +
23 Ext.util.Format.number(record.get('ind'), '0,000 (millions of USD)'));
24 },
25
26 onAxisLabelRender: function (axis, label, layoutContext) {
27 // Custom renderer overrides the native axis label renderer.
28 // Since we don't want to do anything fancy with the value
29 // ourselves except adding a thousands separator, but at the same time
30 // don't want to loose the formatting done by the native renderer,
31 // we let the native renderer process the value first.
32 return Ext.util.Format.number(layoutContext.renderer(label) / 1000, '0,000');
33 }
34
35 });