Amego29 Posted July 14, 2009 Report Share Posted July 14, 2009 hi i am using chart fx 7 for java. and i would like to create a chart using flash format. caun you please give me sample code that do this? thanks in advance Mousa Quote Link to comment Share on other sites More sharing options...
rocioZ Posted July 27, 2009 Report Share Posted July 27, 2009 To properly render the Chart as Flash, you need to call the setOutputWriter() function. Below, please find the sample code I used to test your issue: <%@page import="SoftwareFX.ChartFX.*"%> <html> <head> <title>Stacked Column Chart</title> </head> <body> <% ChartServer chart1 = new ChartServer(application,request,response); java.util.Random r = new java.util.Random(1); chart1.setGallery(Gallery.BAR); // Populating the chart1 with random data chart1.openData(COD.VALUES, 4, 8); for (int i=0;i<4;i++) for (int j=0;j<8;j++) chart1.getValue().setItem(i, j, r.nextDouble() * 20); chart1.closeData(COD.VALUES); chart1.setStacked(Stacked.NORMAL); chart1.setOutputWriter(new SoftwareFX.ChartFX.FlashWriter()); %> <%=chart1.getHtmlTag("600","400","Flash")%> </body> </html> Notice the call to the setOutputWriter() function, and how I specify in the getHtmlTag that I want to render the Chart as Flash. Additionally, you may have to change the Security settings of your Internet Browser in order to download the ActiveX Control (Flash). Quote Link to comment Share on other sites More sharing options...
RandyJ Posted July 27, 2009 Report Share Posted July 27, 2009 Hi, Take a look at the following sample: <%ChartServer chart1 = new ChartServer(pageContext,request,response);chart1.setWidth(600);chart1.setHeight(400);chart1.getImageSettings().setInteractive(false);FlashWriter writer = new FlashWriter();chart1.setOutputWriter(writer);chart1.renderControl();%> Regards, RandyJ Quote Link to comment Share on other sites More sharing options...
rubyrubin Posted December 1, 2009 Report Share Posted December 1, 2009 Hi - I was wondering if there might be a flash version of the ZoomChart? Would love to handle all of the user control client side, if possible. Thanks! - Aaron Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.