Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
we have been using HighCharts for a while now in extensions and mashups, now we need to integrate HighStock and the same methodology does not work. has anyone successfully used HighStock in their Qlik Sense extensions?
this is how we integrate HighCharts (this is a very simplified example to illustrate the integration)
require.config({packages: [{name: 'highcharts',main: 'highcharts'}],
paths: {'highcharts': 'https://code.highcharts.com/12.3.0'}
});
define( ["highcharts"],
function (Highcharts) {
'use strict';
return {
PlotChart: function(ThisContainer) {
Highcharts.chart(ThisContainer, {
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]
}]
});
}//end PlotChart
}
})
Stock documentation says how to use stock.js here (getting-started-stock )
weve tried different ways of adding the module stock.js lifting here from the link above
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/stock/modules/stock.js"></script>
integrated into our code:
define( [
"highcharts",
"highcharts/stock/modules/stock.js"
],
function (Highcharts) {
'use strict';
return {
PlotChart: function(ThisContainer) {
Highcharts.stockChart(ThisContainer, {
rangeSelector: {selected: 1},
series: [{
data: [1, 2, 3]
}]
});
}//end PlotChart
}
})
we just get a syntax error in console
pls help
thanks in advance
edwin
we got help from a third party consultant and this is what we found:
we were misled by the link from Highcharts, we were following this series of calls:
what worked for us was this:
i am not an expert with js or require and i would never have imagined that in the docs it says this:
stock/modules/stock.js
when we should be using
modules/stock.js
sure there must be some valid explanation for this but this just blows my mind
we got help from a third party consultant and this is what we found:
we were misled by the link from Highcharts, we were following this series of calls:
what worked for us was this:
i am not an expert with js or require and i would never have imagined that in the docs it says this:
stock/modules/stock.js
when we should be using
modules/stock.js
sure there must be some valid explanation for this but this just blows my mind
i hope someone else finds this useful