@Override
    public Object produceDataset(Map params) throws DatasetProduceException {

        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        try {
            ArrayList<bConsulta2> obja = jConsultaWeb.getMediaHoras2(
                    params.get("data_in").toString(),
                    params.get("data_fim").toString(),
                    Integer.valueOf(params.get("gmp").toString()),
                    params.get("arg_prod").toString());

/*
            for (int series = 0; series < seriesNames.length; series++) {
                int lastY = (int) (Math.random() * 1000D + 1000D);
                for (int i = 0; i < categories.length; i++) {
                    int y = lastY + (int) (Math.random() * 200D - 100D);
                    lastY = y;
                    dataset.addValue(y, seriesNames[series], categories[i]);
                }
            }
*/
            for (bConsulta2 a : obja) {
                
                dataset.addValue(a.getCont(),a.getPosto() , a.getData_in());
                //seriesNames.add(a.getPosto().toString());
                
            }

        } catch (SQLException ex) {
            Logger.getLogger(Teste1.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Teste1.class.getName()).log(Level.SEVERE, null, ex);
        }
        return dataset;
    }