xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lila Tran <chinaros...@gmail.com>
Subject Re: How come my piechart is gray when using svg
Date Fri, 19 Aug 2005 15:29:09 GMT
Thank you so much for replying.  Click the below link for the output,
it will lead you to the jfreechart forum, someone there has the exact
same problem as I did.   I posted a reply to that thread saying that I
have the same problem.  but you can view the output at this link
http://www.jfree.org/phpBB2/viewtopic.php?p=40152#40152

Please let me know,

Thanks,

Lila

On 8/19/05, Thomas DeWeese <Thomas.DeWeese@kodak.com> wrote:
> Hi Lila,
> 
> Lila Tran wrote:
> > I'm trying to save chart as svg, but the piechart is gray even though
> > the legend is supposed to red.  I even tried to change the section
> > color, but it doesn't do any good.  When i try to save it as svg or
> > png, the piechart colors execute just fine, but not sure why the gray
> > part on my chart when saving just svg.  Please help, below is my
> > method for savingChar
> 
>     I don't know why you are having this problem.  Can you
> provide the SVG output?
> 
> >
> > Below is my method, for some charts it is ok, and for some piecharts
> > they are not ok.
> >
> > // saveChartToSVG(), source from online from JFreeChart forum
> >  public void saveChartToSVG( JFreeChart chart, OutputStream outStream,
> >      int width, int height ) throws Exception
> >  {
> >    if ( chart !=3D null )
> >    {
> >      DOMImplementation domImpl =3D
> > GenericDOMImplementation.getDOMImplementation();
> >      Document document =3D domImpl.createDocument( null, "svg", null );
> >      SVGGraphics2D svgGenerator =3D new SVGGraphics2D( document );
> >      // set the precision to avoid a null pointer exception in Batik 1.5
> >      svgGenerator.getGeneratorContext().setPrecision(6);
> >      chart.draw( svgGenerator, new Rectangle2D.Double( 0, 0, width, height=
> >  ),
> >          null );
> >      boolean useCSS =3D true;
> >      Writer out =3D new OutputStreamWriter( outStream, "UTF-8" );
> >      svgGenerator.stream( out, useCSS );
> >      out.close();
> >    }
> >  }
> >
> > If you look at the attachment, you see the gray part of the chart?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message