title: How can I change the color of the Pie charts using echarts?
body: <p>I am using <a href="https://www.echartsjs.com/en/index.html" rel="noreferrer">echarts</a>. I want to assign my own color palette for the generated pie chart. I write the following code;</p>
  
  <pre><code>var myChart = echarts.init(document.getElementById('EAR-charts'));
  var colorPalette = ['#00b04f', '#ffbf00', 'ff0000']
  optionEAR = {
      title: {
          text: 'Element at Risk',
          subtext: 'Pie chart',
          x: 'center'
      },
      tooltip: {
          trigger: 'item',
          formatter: "{a} &lt;br/&gt;{b} : {c} ({d}%)"
      },
      legend: {
          orient: 'vertical',
          left: 'left',
          data: ['Agriculture', 'Builtup', 'Roads']
      },
      series: [
          {
              name: 'Element at Risk',
              type: 'pie',
              radius: '55%',
              center: ['50%', '60%'],
              data: [
                  { value: 335, name: 'Agriculture' },
                  { value: 310, name: 'Builtup' },
                  { value: 234, name: 'Roads' }
              ],
              itemStyle: {
                  emphasis: {
                      shadowBlur: 10,
                      shadowOffsetX: 0,
                      shadowColor: 'rgba(0, 0, 0, 0.5)'
                  }
              }
          }
      ],
      graph: {
          color: colorPalette
      }
  };
  myChart.setOption(optionEAR);
  </code></pre>
  
  <p>But the color is not changing. But the output shows the default color of pie chart. How can I change the color of the pie charts to my unique color palette?</p>