title: hide labels and 0 values in chart.js?
body: <p>I am beginner on this Chart.js and wanna ask,  How can I hide the labels and 0 values in the bar Chart. I cannot just hide the whole Dataset since I am using a SQL Table to get the Values &quot;into&quot; Chart.Js. I just want the bar chart show only if the labels have the value. Need your help</p>
  <p><a href="https://i.stack.imgur.com/w3N43.jpg" rel="nofollow noreferrer">sample chart</a></p>
  <pre><code>{
      {
          $.post(&quot;datachartasr.php&quot;,
          function (data)
          {
              console.log(data);
              var intake = [];
              var active = [];
              var inactive = [];
              var deffered = [];
              var widthdrawn = [];
              var dis_ter_dereg = [];
              var missing = [];
              for (var i in data) {
                  intake.push(data[i].intake);
                  active.push(data[i].active);
                  inactive.push(data[i].inactive);
                  deffered.push(data[i].deffered);
                  widthdrawn.push(data[i].widthdrawn);
                  dis_ter_dereg.push(data[i].dis_ter_dereg);
                  missing.push(data[i].missing);
              }
              var chartdata = {
                  labels: intake,
                  datasets: [
                      {
                          label: 'Active Status',
                          backgroundColor: '#1E90FF',
                          borderColor: '#1E90FF',
                          hoverBackgroundColor: '#1E90FF',
                          hoverBorderColor: '#666666',
                          data: active
                      },
                      {
                          label: 'Deferred Status',
                          backgroundColor: '#708090',
                          borderColor: '#708090',
                          hoverBackgroundColor: '#708090',
                          hoverBorderColor: '#666666',
                          data: deffered
                      },
                      
  
  .....
  .....
  .....
  
                  ]                   
              };
              var graphTarget = $(&quot;#graphCanvas&quot;);
              var barGraph = new Chart(graphTarget, {
                  type: 'bar',
                  data: chartdata,
              });
          });
      }
  }
  </code></pre>