/** * uses xgraph to create a simple XY graph persisting it to an svg file. * * @throws IOException * @throws FileNotFoundException */ public static <N extends Number> void createGraph(String title, String xTitle, String yTitle, int width, int height, N... yData) { Chart chart = createChart(Type.XY, title, xTitle, yTitle, width, height, false, null, serie("y(x)", Arrays.asList(yData))); String file = ENV.getTempPath() + FileUtil.getValidFileName(title); exportGraph(file, chart); }
/** * getAttachmentFilename * * @param instance * @param attribute * @param name * @return */ public static String getFilename(Object instance, String attribute, String name) { return ENV.getTempPath() + FileUtil.getValidFileName(BeanValue.getBeanValue(instance, attribute).getValueId() + "." + Util.asString(name)); }
public static String createGraph(Type type, String title, String xTitle, String yTitle, int width, int height, boolean yLogarithmic, List<Object> x, Serie... yn) { Chart chart = createChart(type, title, xTitle, yTitle, width, height, yLogarithmic, x, yn); String file = ENV.getTempPath() + FileUtil.getValidFileName(title); exportGraph(file, chart); return file; }
.getValidFileName(beandef.getName())) && (type == null || type.equals(beandef.getClazz())))) {