AbstractChart.js 909 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @class Ext.chart.overrides.AbstractChart
  3. */
  4. Ext.define('Ext.chart.overrides.AbstractChart', {
  5. override: 'Ext.chart.AbstractChart',
  6. updateLegend: function (legend, oldLegend) {
  7. this.callParent([legend, oldLegend]);
  8. if (legend && legend.isDomLegend) {
  9. this.addDocked(legend);
  10. }
  11. },
  12. performLayout: function() {
  13. if (this.isVisible(true)) {
  14. return this.callParent();
  15. }
  16. this.cancelChartLayout();
  17. return false;
  18. },
  19. afterComponentLayout: function(width, height, oldWidth, oldHeight) {
  20. this.callParent([width, height, oldWidth, oldHeight]);
  21. if (!this.hasFirstLayout) {
  22. this.scheduleLayout();
  23. }
  24. },
  25. allowSchedule: function() {
  26. return this.rendered;
  27. },
  28. doDestroy: function () {
  29. this.destroyChart();
  30. this.callParent();
  31. }
  32. });