title: Setting Common labels and background color common for all the charts in ChartJs
body: <p>Hi guys i am using <a href="http://www.chartjs.org/docs/latest/" rel="nofollow noreferrer">ChartJS</a> for creating pie charts,it is pretty good.In my project i have to create many pie charts, all the charts will have the same labels and background color.In the code given below i am giving the backgroundColor and label while creating the pie charts individually.Is there any way to make label and background color common for all the charts.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;title&gt; ChartJS tutorial &lt;/title&gt;
   &lt;style type="text/css"&gt;
          #pie-charts-wrapper{
           width:1000px;
           margin-left:auto;
           margin-right:auto;
          }
          .pie-chart-wrapper{
           width:500px;
           height:300px;
           box-sizing:border-box;
           float:left;
           padding:20px;
          }
   &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      
      &lt;div id="pie-charts-wrapper"&gt;
         &lt;div class="pie-chart-wrapper"&gt;
            &lt;canvas id="pieChart1" width="500px" height="300" &gt;&lt;/canvas&gt;
         &lt;/div&gt;
         &lt;div class="pie-chart-wrapper"&gt;
            &lt;canvas id="pieChart2" width="500px" height="300" &gt;&lt;/canvas&gt;
         &lt;/div&gt;
      &lt;/div&gt;       
  
      &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js" &gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          var ctx1 = document.getElementById("pieChart1");
          var ctx2 = document.getElementById("pieChart2");
  
    var data1 = {
        labels: ['Signed','Not Signed'],
        datasets: [{
         backgroundColor:['#1abc9c','#34495e'],
          data: [10, 25],
        }],
    };
  
    var data2 = {
        labels: ['Signed','Not Signed'],
        datasets: [{
         backgroundColor:['#1abc9c','#34495e'],
          data: [15, 2]
        }],
    };
  
    var myPieChart1 = new Chart(ctx1,{
        type: 'pie',
        data: data1
    });
  
    var myPieChart2 = new Chart(ctx2,{
        type: 'pie',
        data: data2
    });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>