icloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacoslinuxwindowsinboxwhatsapp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
/** |
|
* @class Ext.chart.overrides.AbstractChart |
|
*/ |
|
Ext.define('Ext.chart.overrides.AbstractChart', { |
|
override: 'Ext.chart.AbstractChart', |
|
|
|
updateLegend: function (legend, oldLegend) { |
|
var dock; |
|
this.callParent([legend, oldLegend]); |
|
if (legend) { |
|
dock = legend.docked; |
|
this.addDocked({ |
|
dock: dock, |
|
xtype: 'panel', |
|
shrinkWrap: true, |
|
autoScroll: true, |
|
layout: { |
|
type: dock === 'top' || dock === 'bottom' ? 'hbox' : 'vbox', |
|
pack: 'center' |
|
}, |
|
items: legend, |
|
cls: Ext.baseCSSPrefix + 'legend-panel' |
|
}); |
|
} |
|
}, |
|
|
|
performLayout: function() { |
|
if (this.isVisible(true)) { |
|
return this.callParent(); |
|
} |
|
this.cancelLayout(); |
|
return false; |
|
}, |
|
|
|
afterComponentLayout: function(width, height, oldWidth, oldHeight) { |
|
this.callParent([width, height, oldWidth, oldHeight]); |
|
this.scheduleLayout(); |
|
} |
|
}); |