src/widgets/ChartOptions.php
protected function registerClientScript()
    {
        $id = $this->getId();
        $options = Json::encode($this->ajaxOptions);
        $this->getView()->registerJs(/** @lang JavaScript */"
            $('.{$id}').on('change.updateChart', function (event) {
                var defaultOptions = {
                    url: $(this).attr('action'),
                    data: $(this).serializeArray(),
                    type: 'post',
                    success: function (html) {
                        $('.{$id}-chart-wrapper').closest('.box').find('.box-body').html(html);
                    }
                };
                event.preventDefault();
                var options = $.extend(defaultOptions, $options, true)
                $.ajax(options);
            });
            ");
    }
protected function registerClientScript()
    {
        $id = $this->getId();
        $options = Json::encode($this->ajaxOptions);
        $this->getView()->registerJs(/** @lang JavaScript */"
            $('.{$id}').on('change.updateChart', function (event) {
                var defaultOptions = {
                    url: $(this).attr('action'),
                    data: $(this).serializeArray(),
                    type: 'post',
                    success: function (html) {
                        $('.{$id}-chart-wrapper').closest('.box').find('.box-body').html(html);
                    }
                };
                event.preventDefault();
                var options = $.extend(defaultOptions, $options, true)
                $.ajax(options);
            });
            ");
    }
protected function registerClientScript ( ) { $ id = $ this -> getId ( ) ; $ options = Json :: encode ( $ this -> ajaxOptions ) ; $ this -> getView ( ) -> registerJs ( /** @lang JavaScript */ "
            $('.{$id}').on('change.updateChart', function (event) {
                var defaultOptions = {
                    url: $(this).attr('action'),
                    data: $(this).serializeArray(),
                    type: 'post',
                    success: function (html) {
                        $('.{$id}-chart-wrapper').closest('.box').find('.box-body').html(html);
                    }
                };
                event.preventDefault();
                var options = $.extend(defaultOptions, $options, true)
                $.ajax(options);
            });
            " ) ; }
Registers JS event listener to re-draw the chart upon demand.

@void
@see ajaxOptions
Registers JS event listener to re - draw the chart upon demand .