From: Nathaniel G. A. <nat...@ya...> - 2004-06-15 20:37:46
|
this is not the proper forum for this. Please discuss this in the Users Forum. what is happening? An Exception? --- kar...@bt... wrote: > Hi, > I was trying to create a 3d Pie chart via a JSP but it doesn't seem to > work... > Any ideas , do you know what I am doing wrong ???? > > See code below..... > > > Thanks > Karan > > > > > <%@ page > import="java.awt.*,org.krysalis.jcharts.*,org.krysalis.jcharts.chartData > ..*, > org.krysalis.jcharts.properties.*,org.krysalis.jcharts.types.ChartType,o > rg.krysalis.jcharts.axisChart.*, > org.krysalis.jcharts.test.TestDataGenerator,org.krysalis.jcharts.encoder > s.JPEGEncoder13, > org.krysalis.jcharts.properties.util.ChartFont,org.krysalis.jcharts.enco > ders.ServletEncoderHelper"%> > <%@ page import="org.krysalis.jcharts.nonAxisChart.PieChart2D"%> > <%@ page import="org.krysalis.jcharts.nonAxisChart.PieChart3D"%> > <% > try > { > int width = 30; > int height = 50; > > PieChart2DProperties properties = new > PieChart2DProperties(); > LegendProperties legendProperties = new > LegendProperties(); > legendProperties.setNumColumns( 2 ); > legendProperties.setPlacement( LegendProperties.RIGHT ); > ChartProperties chartProperties = new ChartProperties(); > > double[] data= { 81d, 55d, 39d, 20.6d }; > String[] labels= { "BMW M5", "BMW M3", "Viper GTS-R", "Corvette > Z06" }; > Paint[] paints= { Color.lightGray, Color.green, Color.blue, > Color.red }; > > PieChart3DProperties pieChart3DProperties= new > PieChart3DProperties(); > PieChartDataSet pieChartDataSet= new PieChartDataSet( "Cars That > Own", > data, > labels, > paints, > pieChart3DProperties > ); > > PieChart3D pieChart3D= new PieChart3D( pieChartDataSet, > new LegendProperties(), > new ChartProperties(), > 400, 350 ); > > > //PieChart3D pieChart3D= new PieChart3D( pieChartDataSet,new > LegendProperties(),new ChartProperties(),400, 350 ); > ServletEncoderHelper.encodeJPEG13( pieChart3D, 1.0f, response ); > } > catch(Exception e) > { > System.out.println(e); > } > %> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND > _______________________________________________ > jCharts-developers mailing list > jCh...@li... > https://lists.sourceforge.net/lists/listinfo/jcharts-developers > __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail |