This template displays supplied data in a simple bar chart form. All data passed to this template must be in numerical form.
Content Type:
text/html
Context Script:
import com.urbancode.anthill3.domain.reporting.graphing.*; import com.urbancode.anthill3.domain.singleton.serversettings.*; import java.awt.Color; producer = new ReportDataProducer(); dataMap = new HashMap(); dataMap.put("data", context.get("output")); report = context.get("report"); chart = GraphicsHelper.createChart(producer, "stackedverticalbar3d", report.getName(), "Builds", report.getName(), dataMap, new Color[] {Color.RED, Color.GREEN}); String chartUrl = GraphicsHelper.getChartUrlString(context.get("request"), context.get("response"), chart, 800, 400); context.put("chartUrl", chartUrl);
Template Text:
<html> <head> <title>$report.Name</title> </head> <body> <center> <h1> Report: $report.Name</h1> #set ($dummy = $map.put("data", $output)) <img src="$chartUrl"/> </center> </body> </html>
Related Content