Uploaded image for project: 'ZK Charts'
  1. ZK Charts
  2. ZKCHARTS-37

moving zkcharts within portal layout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.1.0
    • 2.0.1
    • Security Level: Jimmy

      when moving panel with charts component between portal columns a JS error occurs when using hflex/vflex on the chart

      the attachment is a reproducing example
      ---------------------------------
      the workaround is to override the "unbind_" method of the widget by adding the following script to your zul file:

      	<script><![CDATA[
      		zk.afterLoad('chart', function() {
      			zk.override(chart.Charts.prototype, "unbind_", function() {
      				this.$unbind_.apply(this, arguments);
      				this._chartLoaded = false; /*reset the loaded flag*/
      			});			
      		});
      	]]></script>
      

      during debugging we also noticed the chart.Charts widget class has 2 "unbind_" method declarations.
      This should be sorted out, either the first one is obsolete and can be removed or both need to be combined into one method to avoid future confusion, and missing code.

      ...
      line 140:
      	unbind_: function() {
      		zWatch.unlisten({onSize: this});
      	},
      ...
      line 378:
      	unbind_: function () {
      		if (this.engine) {
      			this.engine.destroy();
      			this.engine = null;
      		}
      		this.$supers(chart.Charts,'unbind_', arguments);
      	},
      

            christopherszu christopherszu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h