]> git.proxmox.com Git - extjs.git/blob - extjs/examples/kitchensink/classic/samples/view/charts/column3d/NegativeController.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / charts / column3d / NegativeController.js
1 Ext.define('KitchenSink.view.charts.column3d.NegativeController', {
2 extend: 'Ext.app.ViewController',
3 alias: 'controller.column-negative-3d',
4
5 onDownload: function () {
6 var chart = this.lookupReference('chart');
7
8 if (Ext.os.is.Desktop) {
9 chart.download({
10 filename: '3D Column Chart with Negative Values'
11 });
12 } else {
13 chart.preview();
14 }
15 },
16
17 onSeriesRender: function (sprite, config, data, index) {
18 var isNegative = data.store.getAt(index).get('gaming') < 0;
19
20 if (isNegative) {
21 return {
22 fillStyle: '#974144' // dark red
23 };
24 }
25 }
26
27 });