/** * Constructs a new ChartRenderingInfo structure that can be used to * collect information about the dimensions of a rendered chart. */ public ChartRenderingInfo() { this(new StandardEntityCollection()); }
ebp = (EntityBlockParams) params; if (ebp.getGenerateEntities()) { sec = new StandardEntityCollection(); entityArea = (Shape) area.clone(); ChartEntity entity = new ChartEntity(entityArea, this.toolTipText, this.urlText); sec.add(entity); result = new BlockResult(); result.setEntityCollection(sec);
if (params instanceof EntityBlockParams && ((EntityBlockParams) params).getGenerateEntities()) { sec = new StandardEntityCollection(); sec.add(new TitleEntity(hotspot, this)); EntityCollection ec = ((BlockResult) val).getEntityCollection(); if (ec != null && sec != null) { sec.addAll(ec); ((BlockResult) val).setEntityCollection(sec);
ebp = (EntityBlockParams) params; if (ebp.getGenerateEntities()) { sec = new StandardEntityCollection(); EntityBlockResult ebr = (EntityBlockResult) r; EntityCollection ec = ebr.getEntityCollection(); sec.addAll(ec);
ebp = (EntityBlockParams) params; if (ebp.getGenerateEntities()) { sec = new StandardEntityCollection(); entityArea = (Shape) area.clone(); ChartEntity entity = new ChartEntity(entityArea, this.toolTipText, this.urlText); sec.add(entity); result = new BlockResult(); result.setEntityCollection(sec);
if (params instanceof EntityBlockParams && ((EntityBlockParams) params).getGenerateEntities()) { sec = new StandardEntityCollection(); sec.add(new TitleEntity(hotspot, this)); EntityCollection ec = ((BlockResult) val).getEntityCollection(); if (ec != null && sec != null) { sec.addAll(ec); ((BlockResult) val).setEntityCollection(sec);
ebp = (EntityBlockParams) params; if (ebp.getGenerateEntities()) { sec = new StandardEntityCollection(); EntityBlockResult ebr = (EntityBlockResult) r; EntityCollection ec = ebr.getEntityCollection(); sec.addAll(ec);
/** * Constructs a new ChartRenderingInfo structure that can be used to * collect information about the dimensions of a rendered chart. */ public ChartRenderingInfo() { this(new StandardEntityCollection()); }
StandardEntityCollection sec = new StandardEntityCollection(); sec.add(entity); result.setEntityCollection(sec);
try { final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); ChartUtilities.writeChartAsPNG(response, chart, 600, 400, info); } catch (Exception e) { System.out.println(e); }
StandardEntityCollection sec = new StandardEntityCollection(); sec.add(entity); result.setEntityCollection(sec);
private void performChartRendering(DesignOptions options, OutputStream outputStream) { try { EESGenerator chartGenerator = new EESGenerator(); ChartRenderingInfo renderingInfo = new ChartRenderingInfo(new StandardEntityCollection()); chartGenerator.createChartToOutputStream(options, renderingInfo, outputStream); } catch (Exception e) { LOGGER.error("Could not render timeseries chart.", e); throw new InternalServiceException(); } }
public static String renderChart(JFreeChart chart, String fileName) { String imageFile = ""; try { final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); TempDir tempDir = TempDirUtils.createTempDir(); File file1 = tempDir.createFile(fileName); imageFile = "<IMG SRC=\"file:" + file1.getAbsolutePath() + "\" " + "WIDTH=\"600\" HEIGHT=\"400\" BORDER=\"0\" USEMAP=\"#chart\"></IMG>"; ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info); } catch (IOException e) { } return imageFile; }
private ImageDataResult performChartRendering(DesignOptions options) { try { EESGenerator chartGenerator = new EESGenerator(); ChartRenderingInfo renderingInfo = new ChartRenderingInfo(new StandardEntityCollection()); String chartUrl = chartGenerator.createChart(options, renderingInfo); return new ImageDataResult(chartUrl); } catch (Exception e) { LOGGER.error("Could not render time series chart.", e); throw new InternalServiceException(); } }
File file1; if (!indexFile){ info = new ChartRenderingInfo(new StandardEntityCollection()); file1 = new File(iter_path+"/png/"+fileName+".png"); ChartUtilities.saveChartAsPNG(file1, chart, width, height, info);
public void getPieChart() { DefaultPieDataset pieDataset = new DefaultPieDataset(); pieDataset.setValue("JavaWorld", new Integer(75)); pieDataset.setValue("Other", new Integer(25)); JFreeChart chart = ChartFactory.createPieChart("Discounts Used by Category ", data, true, true, false); //chart.setBackgroundPaint(new Color(222, 222, 255)); final PiePlot plot = (PiePlot) chart.getPlot(); plot.setBackgroundPaint(Color.white); plot.setCircular(true); try { final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); final File file1 = new File(getServletContext().getRealPath(".") + "/images/charts/piechart.png"); ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info); } catch (Exception e) { System.out.println(e); } }
@Override public RepresentationResponse producePresentation(DesignOptions options) throws Exception { ChartRenderingInfo renderingInfo = new ChartRenderingInfo(new StandardEntityCollection()); String chartUrl = createChart(options, renderingInfo); Rectangle2D plotArea = renderingInfo.getPlotInfo().getDataArea(); for (Axis axis : renderer.getAxisMapping().values()) { axis.setMaxY(plotArea.getMaxY()); axis.setMinY(plotArea.getMinY()); } ImageEntity[] entities = {}; if (!this.isOverview) { LOGGER.debug("Produced EES diagram " + chartUrl); entities = createImageEntities(renderingInfo.getEntityCollection()); } else { LOGGER.debug("Produced EES Overview diagram " + chartUrl); } Bounds chartArea = new Bounds(plotArea.getMinX(), plotArea.getMaxX(), plotArea.getMinY(), plotArea.getMaxY()); return new EESDataResponse(chartUrl, options, chartArea, entities, renderer.getAxisMapping()); }
try { final ChartRenderingInfo info = new ChartRenderingInfo( new StandardEntityCollection()); final File file1 = new File("BarChart.png"); ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);
ChartRenderingInfo info = null; if(showToolTips() || showUrls()) { info = new ChartRenderingInfo(new StandardEntityCollection());