private void createSprintBurndownChart(int width, int height) { byte[] imageData = BurndownChart.createBurndownChartAsByteArray(project.getCurrentSprint(), width, height); IO.copyDataToFile( imageData, new File(outputDir.getPath() + "/sprint-burndown-" + width + "x" + height + ".png")); }
@Override protected void build(APdfContainerElement pdf) { Sprint sprint = project.getCurrentSprint(); pdf.paragraph().text("Sprint Backlog", headerFonts[0]); pdf.nl(); pdf.paragraph().text("Burndown", headerFonts[1]); pdf.image(BurndownChart.createBurndownChartAsByteArray(sprint, 1000, 500)) .setScaleByWidth(150f); pdf.nl(); pdf.paragraph().text("Stories", headerFonts[1]); List<Requirement> requirements = new ArrayList<Requirement>(sprint.getRequirements()); for (Requirement req : requirements) { if (req.isClosed()) continue; pdf.nl(); pdf.paragraph().text(req.getReferenceAndLabel(), headerFonts[3]); wiki(pdf, req.getDescription()); FieldList fields = pdf.fieldList().setLabelFontStyle(fieldLabelFont); if (req.isTestDescriptionSet()) wiki(fields.field("Test"), req.getTestDescription()); if (req.isEstimatedWorkSet()) fields.field("Estimated work").text(req.getEstimatedWork()); } }