Explorar el Código

[FIX]ajuste de filtros y formato

deisy hace 6 años
padre
commit
b9942ac05e
Se han modificado 2 ficheros con 3 adiciones y 6 borrados
  1. 2 5
      static/src/js/reports/report_crm.js
  2. 1 1
      static/src/reports/report_crm.xml

+ 2 - 5
static/src/js/reports/report_crm.js

@@ -563,11 +563,7 @@ function report_crm(reporting) {
       var receiptCanvas = $("#reporting-chart");
       var context = receiptCanvas.get(0).getContext("2d");
 
-      if (window.bar != undefined) {
-        window.bar.destroy();
-      }
-
-      window.bar = new Chart(context, {
+      var myChart = new Chart(context, {
         type: 'bar',
         data: {
           labels: names,
@@ -581,6 +577,7 @@ function report_crm(reporting) {
           responsive: true,
           responsiveAnimationDuration: 10,
           maintainAspectRatio: false,
+          events: ['click'],
           scales: {
             yAxes: [{
               ticks: {

+ 1 - 1
static/src/reports/report_crm.xml

@@ -71,7 +71,7 @@
     </div>
 
     <div class="report-form" style="display:none;">
-      <div id="chart-container" class="chart-container center-block" style="padding-top:20px; height:300px; padding-bottom:20px;">
+      <div class="chart-container center-block" style="padding-top:20px; height:300px; padding-bottom:20px;">
         <canvas id="reporting-chart" class="reporting-chart"></canvas>
       </div>
       <div id="toolbar">