title: Javafx change PieChart color
body: <p>I have a list of color representing a color sequence. I want to apply the new color sequence to the piechart data. </p>
  
  <pre><code>private final int CASPIAN_COLOR_COUNTS = 8;   
  public void setPieChartColor(PieChart chart, List&lt;String&gt; colors) {
  
      chart.getData().get(i);   // for debug to get the node name (.data)
  
      /**
       * Set Pie color
       */
      int i = 0;
      for (String color : colors) {
          final Node node = chart.lookup(".data" + i);
          node.getStyleClass().remove("default-color" + (i % CASPIAN_COLOR_COUNTS));
          node.getStyleClass().add(color);
          i++;
      }
  </code></pre>
  
  <p>but all chart data take <strong>Only one color from Caspian</strong> color. </p>