title: Dynamic colors in graphs
body: <p>I try to load colors dynamicly with jquery.</p>
  
  <p>This is working:</p>
  
  <pre><code> var colors_array= ["#9CC4E4", "#3A89C9", "#F26C4F"];
  
  Morris.Donut({
  
    element: 'donut-example',
     colors: colors_array,
    data: [
      {label: "Download Sales", value: 12},
      {label: "In-Store Sales", value: 30},
      {label: "Mail-Order Sales", value: 20}
    ]
  });
  </code></pre>
  
  <p>Desired result (does not work):</p>
  
  <pre><code>   function graphDonut(colors) {
              var value = colors;
              value = value.replace(/\|/g,'", "');
              var colors_array = '["' + value + '"]';
  
          Morris.Donut({
  
            element: 'donut-example',
             colors: colors_array,
            data: [
              {label: "Download Sales", value: 12},
              {label: "In-Store Sales", value: 30},
              {label: "Mail-Order Sales", value: 20}
            ]
          });
  
      }
  
  graphDonut("#9CC4E4|#3A89C9|#F26C4F");
  </code></pre>