Rev 15884 | Rev 15977 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
<?php$routeOverview = $this->url('discovery-contacts/progress-by-day');$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.js'));$this->headLink()->appendStylesheet($this->basePath('plugins/fontawesome-free/css/all.min.css'));$this->headLink()->appendStylesheet($this->basePath('plugins/daterangepicker/daterangepicker.css'));$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment.min.js'));$this->inlineScript()->appendFile($this->basePath('plugins/daterangepicker/daterangepicker.js'));$this->inlineScript()->appendFile($this->basePath('plugins/chart.js/chart.js'));$this->inlineScript()->appendFile($this->basePath('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.js'));echo <<<CSSCSS;$this->headStyle()->captureEnd();$this->inlineScript()->captureStart();echo <<<JSjQuery( document ).ready(function( $ ) {var startDate = moment().format('YYYY-MM-DD');var endDate = moment().format('YYYY-MM-DD');var ctxChartAverage = document.getElementById("chartAverage").getContext("2d");// draw empty chartvar chartAverage = new Chart(ctxChartAverage, {type: 'line',data: {labels: [],datasets: [{label : 'LABEL_CHART_HOW_ARE_YOU_FEEL',backgroundColor: '#E69090',borderColor: '#E69090',borderWidth: 1,fill: false,data : []},{label : 'LABEL_CHART_CLIMATE_ON_YOUR_ORGANIZATION',backgroundColor: '#66BBBB',borderColor: '#66BBBB',borderWidth: 1,fill: false,data : []},]},options: {tooltips: {mode: 'index',intersect: false},scales: {yAxes: [{ticks: {beginAtZero:true}}]}}});$.fn.reload = function() {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'get','url' : '$routeOverview','data' : {'startDate' : startDate,'endDate' : endDate},success: function (response) {console.log('Hola todo bien');}});}$.fn.reload();});JS;$this->inlineScript()->captureEnd();?><section class="content"><div class="container-fluid"><div class="row"><div class="col-12" id="row-list"><div class="card"><div class="card-header"><h2>Progreso Diario de contactos</h2><div class="form-group"><label>LABEL_DATE_RANGE</label><div class="input-group"><div class="input-group-prepend"><span class="input-group-text"><i class="far fa-calendar"></i></span></div><input type="text" class="form-control float-right" name="filterdate" id="filterdate"></div><!-- /.input group --></div></div><div class="card-body"><div class="row"><div class="col-lg-12 col-12 chart"><canvas id="chartAverage" style="min-height: 250px; height: 250px; max-height: 250px; max-width: 100%;"></canvas></div></div></div></div></div></div></div></section>