class DynamicNbEdges implements DynamicStatistics {

    public static final String NB_EDGES = "dynamic nbedges";
    //Data
    private GraphModel graphModel;
    private double window;
    private double tick;
    private Interval bounds;
    //Average
    private Map<Double, Integer> counts;

    @Override
    public void execute(GraphModel graphModel) {
        this.graphModel = graphModel;
        this.counts = new HashMap<>();
    }

    @Override
    public String getReport() {
        //Time series
        XYSeries dSeries = ChartUtils.createXYSeries(counts, "Nb Edges Time Series");

        XYSeriesCollection dataset = new XYSeriesCollection();
        dataset.addSeries(dSeries);

        JFreeChart chart = ChartFactory.createXYLineChart(
            "# Edges Time Series",
            "Time",
            "# Edges",
            dataset,
            PlotOrientation.VERTICAL,
            true,
            false,
            false);

        chart.removeLegend();
        ChartUtils.decorateChart(chart);
        ChartUtils.scaleChart(chart, dSeries, false);
        String imageFile = ChartUtils.renderChart(chart, "nb-edges-ts.png");

        NumberFormat f = new DecimalFormat("#0.000");

        String report = "<HTML> <BODY> <h1>Dynamic Number of Edges Report </h1> "
            + "<hr>"
            + "<br> Bounds: from " + f.format(bounds.getLow()) + " to " + f.format(bounds.getHigh())
            + "<br> Window: " + window
            + "<br> Tick: " + tick
            + "<br><br><h2> Number of edges over time: </h2>"
            + "<br /><br />" + imageFile;

        /*for (Interval<Integer> count : counts) {
        report += count.toString(dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DOUBLE)) + "<br />";
        }*/
        report += "<br /><br /></BODY></HTML>";
        return report;
    }

    @Override
    public void loop(GraphView window, Interval interval) {<FILL_FUNCTION_BODY>}

    @Override
    public void end() {
    }

    @Override
    public double getWindow() {
        return window;
    }

    @Override
    public void setWindow(double window) {
        this.window = window;
    }

    @Override
    public double getTick() {
        return tick;
    }

    @Override
    public void setTick(double tick) {
        this.tick = tick;
    }

    @Override
    public Interval getBounds() {
        return bounds;
    }

    @Override
    public void setBounds(Interval bounds) {
        this.bounds = bounds;
    }
}

        Graph graph = graphModel.getGraph(window);

        int count = graph.getEdgeCount();

        graphModel.getGraphVisible().setAttribute(NB_EDGES, count, interval.getLow());
        graphModel.getGraphVisible().setAttribute(NB_EDGES, count, interval.getHigh());

        counts.put(interval.getLow(), count);
        counts.put(interval.getHigh(), count);
    
<no_super_class>