title: How to disable the legends in chart.js?
body: <p>I'm trying to style a chart using chart.js but I can't figure out how to disable the legends. At the same time I want to use the generateLegend() to style the legends somewhere else on the page. So I just want to disable the legends inside the canvas element. Can you guys help me?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>canvas id="myChart"&gt;&lt;/canvas&gt;
                          &lt;div id="legendq3"&gt;&lt;/div&gt;
                          &lt;script&gt; 
                              var ctx = document.getElementById("myChart");
  
                              var data = {
                                  labels: [
                                      "Red",
                                      "Green",
                                      "Yellow"
                                  ],
                                  datasets: [
                                      {
                                          data: [300, 50, 100],
                                          backgroundColor: [
                                              "#FF6384",
                                              "#36A2EB",
                                              "#FFCE56"
                                          ],
                                          hoverBackgroundColor: [
                                              "#FF6384",
                                              "#36A2EB",
                                              "#FFCE56"
                                          ]
                                      }]
                              };
  
                              var options = {
                                   legendTemplate :'&lt;ul&gt;'
                                                  +'&lt;% for (var i=0; i&lt;datasets.length; i++) { %&gt;'
                                                  +'&lt;/li&gt;'
                                                  +'&lt;span style=\"background-color:&lt;%=datasets[i].lineColor%&gt;\"&gt;&lt;/span&gt;'
                                                  +'&lt;% if (datasets[i].label) { %&gt;&lt;%= datasets[i].label %&gt;&lt;% } %&gt;'
                                                  +'&lt;/li&gt;'
                                                  +'&lt;/ul&gt;'
  
                              }
  
                              var myDoughnutChart = new Chart(ctx, {
                                  type: 'doughnut',
                                  data: data,
                                  options: options
                              });
  
                              document.getElementById('legendq3').innerHTML = myDoughnutChart.generateLegend();
                          &lt;/script&gt;
  </code></pre>