title: Different colors for one series bar in p:chart
body: <p>I have trouble making this work.</p>
  
  <p>I have one <code>HorizontalBarChartModel</code> with only one series. I tried some solutions found here but none worked for me.</p>
  
  <p>This is the part of method that creates my chart on bean:</p>
  
  <pre><code>ChartSeries estadosSeries = new ChartSeries();
      for (EstadoIniciativaEnum estado : distinctEstados) {
          int value = getIniciativaService().countIniciativasByAnoAndEstadoAndEstrategica(ano, getOrganismoAtual(), estado, estrategica).intValue();
          estadosSeries.set(estado.getDescricao(), value);
  
          if (value &gt; maxValue)
              maxValue = value;
      }
  
      if (distinctEstados.isEmpty()) {
          estadosSeries.set(getMessage("sgii.home.chart.empty"), 0);
      }
  
      horizontalBarModel.addSeries(estadosSeries);
  
      horizontalBarModel.setTitle(SGIIJsfUtil.getMessage(title));
      horizontalBarModel.setSeriesColors(getColorsByEstados(distinctEstados));
      horizontalBarModel.setExtender("chartExtender");
  </code></pre>
  
  <p>And this is my page:</p>
  
  <pre><code> &lt;p:chart id="idPieIniciativaEstado" type="bar" model="#{chartBean.horizontalBarModel}"
               style="width:400px;height:300px"&gt;
          &lt;p:ajax event="itemSelect" listener="#{chartBean.goToPesquisarFromTotal}"/&gt;
          &lt;h:outputScript&gt;
              function chartExtender() {
                  // this = chart widget instance
                  // this.cfg = options
                  this.cfg.seriesDefaults.rendererOptions.varyBarColor = true;
              }
          &lt;/h:outputScript&gt;
      &lt;/p:chart&gt;
  </code></pre>
  
  <p>And as you can see, I continue having the same trouble:
  <img src="https://i.stack.imgur.com/IGuxE.png" alt="chart_pic"></p>
  
  <p><strong>How can I change the colors having only one series on chart?</strong></p>