Bar Chart PrimeFaces

0

Does anyone know how to leave the primefaces bar chart this way?

Itriedtodohereonlythatitalternatescolors,itleavesforexampleinvesofthreecolumnsblue,1blue,1red,1yellow,1greenand1purple.

Code:

privatevoidcreateBarModels(){

testeGrafico=initBarModel2();testeGrafico.setTitle("Bar Charts");
    testeGrafico.setAnimate(true);
    testeGrafico.setLegendPosition("ne");

    Axis yAxis = testeGrafico.getAxis(AxisType.Y);
    yAxis.setMin(0);

}

private BarChartModel initBarModel2() {
    BarChartModel model2 = new BarChartModel();

    graficoA = curvaABCDAO.listaClientes();

    graficoB = curvaABCDAO.listaClientesB();

    ChartSeries t1 = new ChartSeries();
    ChartSeries t2 = new ChartSeries();

    for (ChamadosEntity tc : graficoA) {
        t1.setLabel(tc.getAbc());
        t1.set(tc.getSolucao(), tc.getChamados());

    }

    for (ChamadosEntity tb : graficoB) {
        t2.setLabel(tb.getAbc());
        t2.set(tb.getSolucao(), tb.getChamados());

    }

    model2.addSeries(t1);
    model2.addSeries(t2);
    return model2;
}

Test image I made:

    
asked by anonymous 31.08.2017 / 20:06

0 answers