Inheritance: extends yii\web\AssetBundle
                'data-toggle' => 'tooltip',
                'title' => 'Clique para gerar um PDF',
                'disabled' =>
                    (isset($modelRelatorio->idrelatorio) && count($valoresContasAReceber) > 0) ?
                        false : true,
            ]);
            ?>
        </div>

        <?php ActiveForm::end(); ?>

    </div>

<?php
if (isset($modelRelatorio->idrelatorio) && count($valoresContasAReceber) > 0) {
    HighchartsAsset::register($this)->withScripts(['highstock', 'modules/exporting', 'modules/drilldown']);
    echo Highcharts::widget([

        'options' => [
            'chart' => [
                'type' => 'column'],
            'title' => ['text' => 'Valores recebidos  de <b>' .
                $modelRelatorio->formatarDataDiaMesAno($modelRelatorio->inicio_intervalo) . ' até ' .
                $modelRelatorio->formatarDataDiaMesAno($modelRelatorio->fim_intervalo)],
            'xAxis' => [
                'categories' => ['Data']
            ],
            'yAxis' => [
                'title' => ['text' => 'Valor(R$)']
            ],
            'credits' => false,
Example #2
0
 /**
  * Registers required assets and the executing code block with the view
  */
 protected function registerAssets()
 {
     // register the necessary assets
     HighchartsAsset::register($this->view)->withScripts($this->scripts);
     // prepare and register JavaScript code block
     $jsOptions = Json::encode($this->options);
     $setupOptions = Json::encode($this->setupOptions);
     $js = "Highcharts.setOptions({$setupOptions}); var chart = new Highcharts.{$this->constr}({$jsOptions});";
     $key = __CLASS__ . '#' . $this->id;
     $this->view->registerJs($js, View::POS_LOAD, $key);
 }
Example #3
0
 /**
  * Registers required assets and the executing code block with the view
  */
 protected function registerAssets()
 {
     // register the necessary assets
     HighchartsAsset::register($this->view)->withScripts($this->scripts);
     // prepare and register JavaScript code block
     $jsOptions = Json::encode($this->options);
     $setupOptions = Json::encode($this->setupOptions);
     $js = "Highcharts.setOptions({$setupOptions}); var chart = new Highcharts.{$this->constr}({$jsOptions});";
     $key = __CLASS__ . '#' . $this->id;
     if (is_string($this->callback)) {
         $callbackScript = "function {$this->callback}(data) {{$js}}";
         $this->view->registerJs($callbackScript, View::POS_READY, $key);
     } else {
         $this->view->registerJs($js, View::POS_LOAD, $key);
     }
 }
                    'data-toggle' => 'tooltip',
                    'title' => 'Clique para gerar um PDF',
                    'disabled' =>
                        (isset($modelRelatorio->idrelatorio) && count($tiposPagamentos) > 0) ?
                            false : true,
                ]);
            ?>
        </div>

        <?php ActiveForm::end(); ?>

    </div>

<?php
if (isset($modelRelatorio->idrelatorio) && count($tiposPagamentos) > 0) {
    HighchartsAsset::register($this)->withScripts(['highcharts', 'modules/exporting', 'modules/drilldown', 'highcharts-more',]);
    echo Highcharts::widget([

        'options' => [
            'chart' => [
                'type' => 'column'],
            'title' => ['text' => 'Total de pagamentos de pedidos feitos  de <b>' .
                $modelRelatorio->formatarDataDiaMesAno($modelRelatorio->inicio_intervalo) . ' até ' .
                $modelRelatorio->formatarDataDiaMesAno($modelRelatorio->fim_intervalo)],
            'xAxis' => [
                'categories' => ["Tipo de Pagamento"]
            ],
            'yAxis' => [
                'title' => ['text' => 'Quantidade de pagamentos feitos por Tipo de Pagamento']
            ],
            'credits' => false,