Jump to content
Software FX Community

Null Pointer Exception while creating the Flash Chart


anitha

Recommended Posts

 Hi,

I wrote the following java code for generating the flash chart:

     ChartServer ch = new ChartServer();
     ch.setChart3D(false);
   ch.openData(COD.VALUES, 1, 100);
   for (int i=0;i<99;i++)
   {
     ch.setValue(0, i, java.lang.Math.random()* 80);
   }
   ch.closeData(COD.VALUES);
   FlashWriter w = new FlashWriter();

   Axis axis = ch.getAxisY();
   axis.setMinorStep((short) 5);
   axis.setMinorTickMark(TickMark.INSIDE);
   axis.setMinorGridlines(true);
   axis.getMinorGrid().setColor(new java.awt.Color(255, 0, 0));

   ch.setInsideColor(new java.awt.Color(192, 192, 192));
   axis.getGrid().setColor(new java.awt.Color(0, 0, 0));
   axis.setAlternateColor(new java.awt.Color(255, 255, 255));
   axis.setInterlaced(true);

   ch.setOutputWriter(w);
     
     ch.getHtmlTag("400","400","Flash");

I am getting an exception while generating Flash Chart using ChartFx6.5 for java,      
17:52:40,956 ERROR [[knchart]] Servlet.service() for servlet knchart threw exception
java.lang.NullPointerException
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.yZYw(Unknown Source)
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.WZYw(Unknown Source)
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.zZYw(Unknown Source)
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.V$ww(Unknown Source)
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.wZYw(Unknown Source)
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.Vxww(Unknown Source)
 at SoftwareFX.internal.ChartFX.Internet.Server.Chart.yxww(Unknown Source)
 at SoftwareFX.ChartFX.Chart.getHtmlTag(Unknown Source)
 at SoftwareFX.ChartFX.ChartServer.getHtmlTag(Unknown Source)  

I wrote the above java code by looking into the flash.jsp example given in Chartfx samples folder.But while using that in Java code i am getting this exception.Could you please explain me the behavior of getHtmlTag function.

Can we use getHtmlDataEx function for generating the Flash Chart?

Thanks,
Anitha  
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...