The Chart FX for Java plugin for Netbeans allows you to visually design the Chart. Similar to the Chart FX for Java Designer, it will generate a configuration file in XML format, called chart template, which can be imported at run time, to produce a Chart with the desired visual attributes.

Requirements and Installation
The Chart FX for Java plugin for Netbeans requires Netbeans 4.x. The plugin source, SoftwareFX.ChartFX.Designer.NetBeans.nbm, it is installed as part of Chart FX for Java, and can be found in the Plugins/NetBeans folder in your installation location. To install the plugin:
1. Select Tools / Update Center / Install Manually Downloaded Modules (.nbm Files) and click Next.
2. In the next screen, click Add, and browse to your Chart FX for Java Location and select the plugin nbm file. Click Next.
3. Follow the wizzar to complete the installation.
Using the Plugin
1 . In order to create a chart template you need to be inside a project. Select File / New File or simply press CRTL-N.
2. Select Chart FX for Java / CFX and click Next.

3. Select the location (project folder) and name of the chart template and click Finish.

4. The chart template will be added to to project and the Designer will show a default chart.

Integrating the chart template to your application
Once the chart template is configured and saved with the desired visual attributes, it may be imported into any pre-populated Chart FX chart to produce the desired look and feel with just one line of code:
chart1.importChart(FileFormat.XML, application.getRealPath("/cfxjava") + "/plugin/newchart.cfx");
|
Bellow is a complete code to create a chart, import the template and generate the chart image in png format:
<%@page import="SoftwareFX.ChartFX.*"%> <% ChartServer chart1 = new ChartServer(application,request,response); chart1.importChart(FileFormat.XML, application.getRealPath("/cfxjava") + "plugin/newchart.cfx")); %> <%=chart1.getHtmlTag("450","280","PNG")%>
|
|