Jump to content
Software FX Community

vishalhkd

Members
  • Posts

    3
  • Joined

  • Last visited

vishalhkd's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, We are using Chartfx 7.0 for java here at the census bureau. As long as we use the renderControl() method, the chart renders fine and we are able to access the charts via the AJAX toolbar. However, there are use cases where we need to generate the chart as an image and embed them in PDF reports. We are trying to use the exportChart() method for this and trying to create a PNG image as shown in the code example below .... However, the image produced by this method shows "Invalid ChartFX licenese" message. Below is the source sample for this. private File getChartFile(ChartData chartData, FileFormat fileFormat, Gallery gallery, AxisFormat axisFormat, int width, int height) { ChartServer chart1 = new ChartServer(); // Feeds in the chart data to chart server initChart(chart1, chartData); File tempFile = null; chart1.setGallery(gallery); try { tempFile = File.createTempFile("euschartfx", ".cfx"); FileOutputStream ostream = new FileOutputStream(tempFile); chart1.setFileContents(EnumSet.of(FileContents.ALL)); chart1.exportChart(fileFormat, ostream); ostream.close(); } catch (IOException e) { ExceptionController.getGenericException().handleAjaxWithRedirect(e); } return tempFile; } What are we missing here? Thanks, -- Vishal IBM / Census Bureau
  2. We would like to have the ChartFX server write the temp files to the java.io.temp directory instead of the default chartfx70/temp directory. How can we do this?
  3. I would like to know if there is a way to clear out all the temp files created in the temp directory at the end of a user session.
×
×
  • Create New...