]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('KitchenSink.view.charts.column3d.GroupedController', {\r |
2 | extend: 'Ext.app.ViewController',\r | |
3 | alias: 'controller.column-grouped-3d',\r | |
4 | \r | |
5 | onAxisLabelRender: function (axis, label, layoutContext) {\r | |
6 | // Custom renderer overrides the native axis label renderer.\r | |
7 | // Since we don't want to do anything fancy with the value\r | |
8 | // ourselves except adding a thousands separator, but at the same time\r | |
9 | // don't want to loose the formatting done by the native renderer,\r | |
10 | // we let the native renderer process the value first.\r | |
11 | var value = layoutContext.renderer(label) / 1000;\r | |
12 | return value === 0 ? '$0' : Ext.util.Format.number(value, '$0K');\r | |
13 | },\r | |
14 | \r | |
15 | onSeriesLabelRender: function (value) {\r | |
16 | return Ext.util.Format.number(value / 1000, '$0K');\r | |
17 | },\r | |
18 | \r | |
19 | onGridColumnRender: function (v) {\r | |
20 | return Ext.util.Format.number(v, '$0,000');\r | |
21 | }\r | |
22 | \r | |
23 | }); |