I want to use Highcharts within a Custom Visualisation Component for Jaspersoft Community 6.2.2. The basic setup (JSON file for basic configuration and Javascript file for executing the actual visualisation) is clear to me. Examples work in my setup. However, I don't understand what to write in the Javascript file to make Highcharts work. Basically, I am looking for Javascript code like:
define('example', ['https://code.jquery.com/jquery-3.0.0.js','http://code.highcharts.com/highcharts.js'],
function ($, Highcharts)
{
return function (instanceData) {
$('#container').highcharts({
chart: {type: 'bar'},
title: {text: 'Fruit Consumption'},
xAxis: {categories: ['Apples', 'Bananas', 'Oranges']},
yAxis: {title: {text: 'Fruit eaten'}},
series: [{name: 'Jane',data: [1, 0, 4]}, {name: 'John',data: [5, 7, 3]}]
});
};
});
Any idea how this should look in order to show the Highcharts chart in Jaspersoft? Help appreciated.