Hello,
I’m new to DHTMLX and to javascript. I’m trying to do something simple.
But I get this error at page loading:
“ReferenceError: data is not defined” in dhtmlxchart.js line 2682:
for(var i = 0; i < data.length;i++){
which is part of this function in dhtmlxchart.js:
_getRatios:function(values,totalValue){
var value;
var ratios = [];
var prevSum = 0;
totalValue = totalValue||this._getTotalValue(values);
for(var i = 0; i < data.length;i++){
value = values[i];
ratios[i] = Math.PI*2*(totalValue?((value+prevSum)/totalValue):(1/data.length));
prevSum += value;
}
return ratios;
},
I debugged the code in Firefox with Firebug and although the values that need to be rendered are there; “data” is null. I don’t know why.
Here is my code (it is in my page body):
[code]
[/code]Can you help please ?
Thank you.