1
votes

i'm trying to generate my charts using aFreeChart because i can't use JFreeChart on android, what i want is to use aFreeChart along with the light android's version of iText, but i have no idea how to do that?

private static AFreeChart addChart(List<Player> pl)
    {

        DefaultPieDataset myPiedataset = new DefaultPieDataset();
        for (Player cn : pl) {
            myPiedataset.setValue(cn.getNom_Player(),cn.getAge_Player());
        }

        AFreeChart chart = ChartFactory.createPieChart("Players", myPiedataset,true,true,false);

        TextTitle title = chart.getTitle();
        title.setToolTipText("Titre");

        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setLabelFont(new Font("SansSerif", Typeface.NORMAL, 12));
        plot.setNoDataMessage("No data available");
        plot.setCircular(false);
        plot.setLabelGap(0.02);
        return chart;
    }
You can use achartEngine. Here's the link to it. www.achartengine.orgRaghunandan
@Raghunandan it works with iText?cascadox