Re: 3D pie chart in a JSP

"Nathaniel G. Auvil" <[email protected]> Tue, 15 Jun 2004 13:37:39 -0700 (PDT)
Newsgroups gmane.comp.krysalis.jcharts.devel,gmane.comp.krysalis.jcharts.user
Message-ID <[email protected]>
this is not the proper forum for this. Please discuss this in the Users Forum.

what is happening? An Exception?



--- [email protected] 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
> [email protected]
> 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


-------------------------------------------------------
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