UNPKG

extjs-gpl

Version:

GPL licensed version of Sencha Ext JS

40 lines (33 loc) 1.36 kB
Ext.define('KitchenSink.view.charts.radar.BasicController', { extend: 'Ext.app.ViewController', alias: 'controller.radar-basic', onPreview: function () { if (Ext.isIE8) { Ext.Msg.alert('Unsupported Operation', 'This operation requires a newer version of Internet Explorer.'); return; } var chart = this.lookupReference('chart'); chart.preview(); }, onRefresh: function () { var chart = this.lookupReference('chart'); chart.getStore().refreshData(); }, onDataRender: function (v) { return v + '%'; }, onAxisLabelRender: function (axis, label, layoutContext) { // Custom renderer overrides the native axis label renderer. // Since we don't want to do anything fancy with the value // ourselves except appending a '%' sign, but at the same time // don't want to loose the formatting done by the native renderer, // we let the native renderer process the value first. return layoutContext.renderer(label) + '%'; }, onMultiAxisLabelRender: function (axis, label, layoutContext) { return label === 'Jan' ? '' : label; }, onSeriesLabelRender: function (tooltip, record, item) { tooltip.setHtml(record.get('month') + ': ' + record.get(item.field) + '%'); } });