Hi, i'm developping an application that needs to generate charts, so i used Highchart.js, but when i execute the app on the Tizen Web Application i receive this error : js/charts.js (183) :ReferenceError: Can't find variable: Highcharts . I added these lines on Chart.html file :
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
and in the charts.js :
$(function() {
// Radialize the colors
console.log("charts");
Highcharts.getOptions().colors = Highcharts.map(
Highcharts.getOptions().colors, function(color) {
return {
radialGradient : {
cx : 0.5,
cy : 0.3,
r : 0.7
},
stops : [
[ 0, color ],
[
1,
Highcharts.Color(color).brighten(-0.3).get('rgb') ] // darken
]
};
});
// Build the chart
$('#container').highcharts(
{
chart : {
plotBackgroundColor : null,
plotBorderWidth : null,
plotShadow : false
},
title : {
text : 'Total expense for each target.'
},
tooltip : {
pointFormat : '{series.name}: <b>{point.percentage}%</b>',
percentageDecimals : 1,
fontSize : '20px'
},
plotOptions : {
pie : {
allowPointSelect : true,
cursor : 'pointer',
dataLabels : {
enabled : true,
color : '#000000',
fontSize : '20px',
connectorColor : '#000000',
formatter : function() {
return '<b>'
+ this.point.name
+ '</b>: '
+ Math
.round(this.percentage)
+ ' %';
}
}
}
},
series : [ {
type : 'pie',
name : 'Statistics Per Category',
data : [ [ 'Add', peradd ],
[ 'Retreat', perretreat ], {
name : 'Loan',
y : perloan,
sliced : true,
selected : true
}, [ 'Debt', perdebt ] ]
} ]
});
});
I added in the config.xml this line : <access origin="http://code.highcharts.com/" subdomains="true"/> and it doesn't work too. But when i execute the app with the Tizen web simulator application and it works perfectly,
Anyone have any ideas what might be the problem?