title: Chart.js - How to Add Text in the label of the Chart with JavaScript?
body: <p>i don't know how to add text on  in the label of the Chart JavaScript. 
  My chart use on PC and Tablet.</p>
  
  <p>now chart</p>
  
  <p><img src="https://i.stack.imgur.com/9BanV.png" alt="https://i.stack.imgur.com/9BanV.png"></p>
  
  <p>But I need to label the responsive zones, something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/uhIp9.png" alt="https://i.stack.imgur.com/uhIp9.png"></p>
  
  <p><img src="https://i.stack.imgur.com/WyDnW.png" alt="https://i.stack.imgur.com/WyDnW.png"></p>
  
  <pre><code>&lt;canvas id="myChart" width="500" height="400"&gt;&lt;/canvas&gt;
  </code></pre>
  
  <p>==== My code ( in 1 label data 12 month - 10 year = 1 x bar)</p>
  
  <pre><code>var color = Chart.helpers.color;
  var barChartData = {
  
      labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
      datasets: [{
          type: 'bar',
          label: '&lt;?php echo $year9+543; ?&gt;',
          fill: false,
          borderColor: "rgba(235,189,139,1)",
          data: &lt;? php echo $data_target9_month; ?&gt;
      }, ... Array data ...
  </code></pre>
  
  <p>edit graph</p>
  
  <pre><code>window.onload = function () {
      var ctx = document.getElementById('canvas').getContext('2d');
      window.myBar = new Chart(ctx, {
          type: 'bar',
          data: barChartData,
          options: {
              elements: {
                  line: {
                      tension: 0
                  }
              },
              tooltips: {
                  mode: 'index',
  
                  intersect: false,
                  callbacks: {
                      label: function (tooltipItem, data) {
                          var value = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
                          if (parseInt(value) &gt;= 1000) {
                              return data.datasets[tooltipItem.datasetIndex].label + " : " + '$' + value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
                          }
                          if (parseInt(value) == 0) {
                              return data.datasets[tooltipItem.datasetIndex].label + " : " + 'ไม่มีข้อมูล';
                          }
                          else {
                              return data.datasets[tooltipItem.datasetIndex].label + " : " + '$' + value;
                          }
  
                      }
                  } // end callbacks:
              }
          }
      })
  </code></pre>
  
  <p>thanks.</p>