From: Rew, R. L <rob...@ui...> - 2006-07-17 16:32:47
|
Are there any problems with moving to JDK 1.5 and Tomcat 5.5 using jCharts? =20 =20 I had a clustered bar chart working with jdk 1.4 and Tomcat 4.1.30. As soon as we upgraded to the above, no chart displays at all, yet there are no errors indicated in my application log file nor the Tomcat log files. I had made no code modifications. =20 I know the encoders indicate that you must have jdk 1.4, but I assumed that meant at least jdk 1.4. =20 My code looks as follows: =20 String xAxisTitle =3D "Grades"; String yAxisTitle =3D "Percent"; String title =3D "Grade Distribution"; DataSeries dataSeries =3D new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title ); =20 String[] legendLabels =3D { "Section", "Course", "Department" }; Paint[] paints =3D new Paint[]{ Color.yellow, Color.green, Color.blue }; ClusteredBarChartProperties clusteredBarChartProperties =3D new ClusteredBarChartProperties(); clusteredBarChartProperties.setWidthPercentage( 0.7f ); clusteredBarChartProperties.setShowOutlinesFlag(true); =20 AxisChartDataSet axisChartDataSet =3D new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties ); dataSeries.addIAxisPlotDataSet( axisChartDataSet ); =20 ChartProperties chartProperties =3D new ChartProperties(); AxisProperties axisProperties =3D new AxisProperties(); LegendProperties legendProperties =3D new LegendProperties(); AxisChart axisChart =3D new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, 1000, 500 ); =20 AxisChart axisChart =3D (AxisChart)request.getSession().getAttribute("gradeBarGraph"); JPEGEncoder.encode(axisChart, 1.0f, response.getOutputStream()); =20 =20 =20 Any suggestions? |