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.
I am assuming you have already setup requirejs and phantomjs in your machine. If not then you can refer this or this.You can download CVC high charts example from here where you can also find few other charts example as well as description of circle creation using d3 charts. or you can direct download highchart exmple from here.
Read license document of highchart before utilizing it.