List of usage examples for org.jfree.eastwood ChartEngine buildChart
public static JFreeChart buildChart(Map params)
From source file:org.geotools.renderer.chart.ChartGraphicFactory.java
public Icon getIcon(Feature feature, Expression urlExpression, String format, int size) throws Exception { // evaluate the expression as a string, get the query params String url = urlExpression.evaluate(feature, String.class); if (!validRequest(url, format)) return null; Map params = Parameters.parseQueryString(url.substring(HTTP_CHART.length())); // build the chart, guess its optimal size, return the icon representing it JFreeChart chart = ChartEngine.buildChart(params); int[] chartSize = computeChartSize(size, params); return new ImageIcon(drawChart(chart, chartSize[0], chartSize[1])); }
From source file:org.geotools.renderer.chart.ChartGraphicFactory.java
/** * This method has been provided as a test utility only *///from w w w . ja va2 s . c o m JFreeChart getChart(Feature feature, Expression urlExpression, String format, int size) throws Exception { // evaluate the expression as a string, get the query params String url = urlExpression.evaluate(feature, String.class); if (!validRequest(url, format)) return null; Map params = Parameters.parseQueryString(url.substring(HTTP_CHART.length())); // build the chart, guess its optimal size, return the icon representing it return ChartEngine.buildChart(params); }