From:
<Dia...@nr...> - 2005-02-22 21:58:51
|
I am trying to find a way of clicking on subject categories underneath = a pie chart in order to=20 get to the subcategories indicated by the colors of the pie chart. http://source.cisti-icist.nrc-cnrc.gc.ca/cs/journals/subjects_e.html At the moment, one has to click on the different colors of the pie = chart in order to go to the subcategories. If someone is colour blind, it would help to use the text underneath = the pie chart in order to go to the subcategories. How do I do that? The part of the code for the english pie chart: PieChart2DProperties p2dProps =3D new PieChart2DProperties(); PieChartDataSet p2dData =3D new PieChartDataSet("Journal Coverage", = data, labels_e, paints, p2dProps); LegendProperties lp =3D new LegendProperties(); lp.setBorderStroke(null); lp.setBorderPaint(null); lp.setEdgePadding(1.0f); lp.setPlacement( LegendAreaProperties.BOTTOM ); lp.setNumColumns(1); lp.setFont(new Font("Arial", Font.PLAIN, 10)); PieChart2D p2d =3D new PieChart2D(p2dData, lp, new ChartProperties(), 450, 600); p2d.renderWithImageMap(); ImageMap imageMap =3D p2d.getImageMap(); StringBuffer ebuf =3D new StringBuffer(); ebuf.append("<p>\n<img border=3D\"0\" src=3D\"bsubs_e.jpg\" " + "alt=3D\"Journal coverage pie chart\" " + "useMap=3D\"#chartMap\">\n"); ebuf.append("<map name=3D\"chartMap\">\n"); Iterator iterator=3D imageMap.getIterator(); int i =3D 0; while(iterator.hasNext()) { StringBuffer html =3D new StringBuffer(); ImageMapArea imageMapArea=3D (ImageMapArea) iterator.next(); html.append("alt=3D\"" + imageMapArea.getLengendLabel() + "\""); html.append(" href=3D\"" + pages_e[i++] + "\""); ebuf.append(imageMapArea.toHTML( html.toString()) + "\n"); } ebuf.append("</map>\n"); FileOutputStream fos =3D new = FileOutputStream("journals/bsubs_e.jpg"); JPEGEncoder.encode(p2d, 1.0f, fos); fos.flush(); fos.close(); Regards, Diane-Helene _______________________________________________________ Diane-H=E9l=E8ne Caouette 613-993-9123 dia...@nr...=20 Electronic Document Delivery Technical Support CISTI National Research Council, Building M-55 1200 Montreal Road Ottawa, ON K1A 0S2 Government of Canada 613-993-9123 dia...@nr...=20 Support technique =E0 la fourniture =E9lectronique de documents ICIST Conseil National de Recherches Canada 1200 rue Montr=E9al Ottawa, ON K1A 0S2 Gouvernement du Canada _______________________________________________________ |