public String getChartMap(String chartMapId) throws IOException { StringWriter writer = new StringWriter(); PrintWriter pw = new PrintWriter(writer); try { ChartUtilities.writeImageMap(pw, chartMapId, chartRenderingInfo, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator()); } finally { IOUtil.closeQuietly(pw); } return writer.toString(); }
/** * <p>getChartMap.</p> * * @param chartMapId a {@link java.lang.String} object. * @return a {@link java.lang.String} object. * @throws java.io.IOException if any. */ public String getChartMap(String chartMapId) throws IOException { StringWriter writer = new StringWriter(); PrintWriter pw = new PrintWriter(writer); try { ChartUtilities.writeImageMap(pw, chartMapId, chartRenderingInfo, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator()); } finally { IOUtil.closeQuietly(pw); } return writer.toString(); }
/** * Writes an image map to an output stream. * * @param writer the writer (<code>null</code> not permitted). * @param name the map name (<code>null</code> not permitted). * @param info the chart rendering info (<code>null</code> not permitted). * * @throws IOException if there are any I/O errors. */ public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info) throws IOException { // defer argument checking... ImageMapUtil.writeImageMap( writer, name, info, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator() ); }
/** * Creates an HTML image map. * * @param name the map name (<code>null</code> not permitted). * @param info the chart rendering info (<code>null</code> not permitted). * * @return the map tag. */ public static String getImageMap(String name, ChartRenderingInfo info) { return ImageMapUtil.getImageMap( name, info, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator() ); }
public String getChartMap(String chartMapId) throws IOException { StringWriter writer = new StringWriter(); PrintWriter pw = new PrintWriter(writer); try { ChartUtilities.writeImageMap(pw, chartMapId, chartRenderingInfo, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator()); } finally { IOUtils.closeQuietly(pw); } return writer.toString(); }
/** * Some checks for the generateURLFragment() method. */ public void testGenerateURLFragment() { StandardToolTipTagFragmentGenerator g = new StandardToolTipTagFragmentGenerator(); assertEquals(" title=\"abc\" alt=\"\"", g.generateToolTipFragment("abc")); assertEquals(" title=\"Series "A", 100.0\" alt=\"\"", g.generateToolTipFragment("Series \"A\", 100.0")); }
/** * Creates an HTML image map. This method maps to * {@link ImageMapUtilities#getImageMap(String, ChartRenderingInfo, * ToolTipTagFragmentGenerator, URLTagFragmentGenerator)}, using default * generators. * * @param name the map name (<code>null</code> not permitted). * @param info the chart rendering info (<code>null</code> not permitted). * * @return The map tag. */ public static String getImageMap(String name, ChartRenderingInfo info) { return ImageMapUtilities.getImageMap(name, info, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator()); }
/** * Creates an HTML image map. This method maps to * {@link ImageMapUtils#getImageMap(String, ChartRenderingInfo, * ToolTipTagFragmentGenerator, URLTagFragmentGenerator)}, using default * generators. * * @param name the map name ({@code null} not permitted). * @param info the chart rendering info ({@code null} not permitted). * * @return The map tag. */ public static String getImageMap(String name, ChartRenderingInfo info) { return ImageMapUtils.getImageMap(name, info, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator()); }