|
From: Nathaniel G. A. <nat...@ya...> - 2003-11-10 14:26:11
|
Your chart is 1 pixel by 1 pixel, try increasing the size.
--- Bent Are Melsom <me...@f1...> wrote:
> Hi
>
> This is the code for my chart. I suppose that you are referring to the
> line
>
> double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55 }
> };
>
> If not, you can see the whole code here:
>
> String[] xAxisLabels= { "1998", "1999", "2000", "2001", "2002", "2003",
> "2004" };
> String xAxisTitle= "Years";
> String yAxisTitle= "Problems";
> String title= "CIBER";
> DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle,
> yAxisTitle, title );
>
> double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55 }
> };
> String[] legendLabels= { "Bugs" };
> Paint[] paints=TestDataGenerator.getRandomPaints( 1 );
>
> Stroke[] strokes= { LineChartProperties.DEFAULT_LINE_STROKE };
> Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE };
> LineChartProperties lineChartProperties= new LineChartProperties(
> strokes, shapes );
> AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data,
> legendLabels, paints, ChartType.LINE, lineChartProperties );
> dataSeries.addIAxisPlotDataSet( axisChartDataSet );
>
> ChartProperties chartProperties= new ChartProperties();
> AxisProperties axisProperties= new AxisProperties();
> LegendProperties legendProperties= new LegendProperties();
>
> AxisChart axisChart= new AxisChart( dataSeries, chartProperties,
> axisProperties, legendProperties, 1,1 );
>
> Thanks!
>
> regards
> Bent Are Melsom
>
> ---------------------------------------
> Bent Are Melsom
> mobile: 950 22 874
> e-mail: me...@f1...
> ---------------------------------------
>
> On Mon, 10 Nov 2003, Nathaniel G. Auvil wrote:
>
> >
> > what are you sending as your data?
> >
> >
> > --- Bent Are Melsom <me...@f1...> wrote:
> > > Hi
> > >
> > > I am trying to export a chart to a JPEG image using the JPEGEncoder13
> > > class. This does not work, all I get is an IndexOutOfBoundsException. The
> > > code is
> > >
> > > File file = new File("c:\\file.jpg");
> > > OutputStream out = new FileOutputStream(file);
> > > JPEGEncoder13.encode(axisChart,0.5f,out);
> > >
> > > The exception is:
> > >
> > > java.lang.ArrayIndexOutOfBoundsException: -1
> > > int java.awt.font.LineBreakMeasurer.nextOffset(float, int,
> > > boolean)
> > > LineBreakMeasurer.java:334
> > > java.awt.font.TextLayout
> > > java.awt.font.LineBreakMeasurer.nextLayout(float, int, boolean)
> > > LineBreakMeasurer.java:408
> > > java.awt.font.TextLayout
> > > java.awt.font.LineBreakMeasurer.nextLayout(float)
> > > LineBreakMeasurer.java:382
> > > float org.jCharts.Chart.renderChartTitle(java.lang.String,
> > > java.awt.font.FontRenderContext)
> > > void org.jCharts.axisChart.AxisChart.renderChart()
> > > void org.jCharts.Chart.render()
> > > java.awt.image.BufferedImage
> > > org.jCharts.encoders.BinaryEncoderUtil.render(org.jCharts.Chart)
> > > void org.jCharts.encoders.JPEGEncoder13.encode(org.jCharts.Chart,
> > > float, java.io.OutputStream)
> > > void mypackage2.TestClass.generateLineChart()
> > > TestClass.java:49
> > > void mypackage2.TestClass.main(java.lang.String[])
> > > TestClass.java:62
> > >
> > > The chart is the coded using the example from the user documentation
> > > of linechart from User's Guide 0.3.0 of jCharts 0.7.
> > >
> > > Does anybody have a hint?
> > >
> > > regards
> > > Bent Are Melsom
> > > ---------------------------------------
> > > Bent Are Melsom
> > > mobile: 950 22 874
> > > e-mail: me...@f1...
> > > ---------------------------------------
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by: ApacheCon 2003,
> > > 16-19 November in Las Vegas. Learn firsthand the latest
> > > developments in Apache, PHP, Perl, XML, Java, MySQL,
> > > WebDAV, and more! http://www.apachecon.com/
> > > _______________________________________________
> > > jCharts-users mailing list
> > > jCh...@li...
> > > https://lists.sourceforge.net/lists/listinfo/jcharts-users
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Protect your identity with Yahoo! Mail AddressGuard
> > http://antispam.yahoo.com/whatsnewfree
> >
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by: ApacheCon 2003,
> > 16-19 November in Las Vegas. Learn firsthand the latest
> > developments in Apache, PHP, Perl, XML, Java, MySQL,
> > WebDAV, and more! http://www.apachecon.com/
> > _______________________________________________
> > jCharts-users mailing list
> > jCh...@li...
> > https://lists.sourceforge.net/lists/listinfo/jcharts-users
> >
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> _______________________________________________
> jCharts-users mailing list
> jCh...@li...
> https://lists.sourceforge.net/lists/listinfo/jcharts-users
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
|