Skip to content

DeveloperGuide

Tiago Simões edited this page Oct 30, 2017 · 11 revisions

Pre-Requirements

  • Pentaho BI Platform 3.7 or above should be installed.
  • The Pentaho CDF plugin must be installed.
  • Ant is installed
  • Have a GIT client or plugin for you favourite IDE

How to start

  1. Clone the project from GitHub
  2. Setup build.properties
  3. Specify your Pentaho solutions directory on dir.solutions
  4. Follow the instructions on the Manual to include support on xfusion files
  5. Execute ant default task (dist)
  6. Execute ant install to get the plugin and the samples copied to your Pentaho installation
  7. In Pentaho 5.0+ you should upload the fusion_samples zip file (it can be found at project_folder/dist/fusion_samples.zip) to the Pentaho User Console (PUC) /public/plugin-samples folder
  8. Restart Pentaho
  9. Open the Pentaho User Console
  10. Go to bi-developers/fusion-samples or /public/plugin-samples/fusion-charts (Pentaho 5.0+)
  11. Double click on the available xfusion samples and CDE or CDF dashboards

How to add new charts

XDashFusionChartComponent

If the chart you want to add has a similar XML structure to the ones already available, all you need to do is to add the new chart to the ChartType enum in the ChartType.java file and recompile the code.

If you want to add a chart or widget with a different XML structure from the ones who already exist, you will need to do some development on the ChartFactoryWidget.java or ChartFactoryChart.java files, depending on the kind of chart you want do add. Check some code examples on how to add an Angular Gauge or Bullet widgets in the ChartFactoryWidget.java file.

The swf files associated to the new charts should be placed in the fusioncharts/charts path.

After making the development:

  • Create a sample that tests the chart
  • Submit the code and the sample by opening an issue

XPFusionChartComponent

If the chart you want to add has a similar structure to the one already available you don't need to specify a new chart. All you need to do is use the name of your chart when defining it. If your chart has a different structure you will need to add a new switch to XDashFusionComponentAsync that define the structure for the chart data that you will receive from the server. The model should be similar to the one already implemented.