title: Setting Chart.js Pie-Graph Options
body: <p>I'm having some difficulty inserting options into my displayed chart.</p>
  
  <p>Here is the code, of particular note are the values under the "options" section.</p>
  
  <pre><code>var randomScalingFactor = function() 
  {
      return Math.round(Math.random() * 100);
  };
  var randomColorFactor = function() {
      return Math.round(Math.random() * 255);
  };
  var randomColor = function(opacity) {
      return 'rgba(' + randomColorFactor() + ',' + randomColorFactor() + ',' + randomColorFactor() + ',' + (opacity || '.3') + ')';
  };
  
  var config = 
  {
      type: 'pie',
      data: 
      {
          datasets: 
          [
              {
                  data: 
                  [
                      &lt;?php
                          foreach($_responseArray as $_key =&gt; $_val)
                          {
                              echo("\"".$_val."\",");  
                          }
                      ?&gt;
                  ],
  
                  backgroundColor: 
                  [
                      "#F7464A",
                      "#46BFBD",
                      "#FDB45C",
                      "#949FB1",
                      "#4D5360",
                  ],
              }
          ],
          labels:
          [
              &lt;?php
                  foreach($_responseArray as $_key =&gt; $_val)
                  {
                      echo("\"".$_key."\",");  
                  }
              ?&gt;
          ]
      },
      options: 
      {
          scaleFontSize: 20,
          segmentStrokeColor : "#fff",
          responsive: true
      },
  
  };
  
  window.onload = function() 
  {
      var ctx = document.getElementById("chart-area").getContext("2d");
      window.myPie = new Chart(ctx, config);
  };
  </code></pre>
  
  <p>Currently, none of these options are being applied <em>scaleFontSize</em>,  <em>segmentStrokeColor</em>, <em>responsive</em>, none of them work.</p>
  
  <p>I have looked over the online <a href="http://www.chartjs.org/docs/" rel="nofollow">documentation</a>, provided samples, and it appears this is the correct way to provide the options. However, clearly I am doing something wrong.</p>