I am receiving the following error in IE using dhtmlXChart and IE9 …
‘values[…].text’ is null or not an object at line 126, character 213 in dhtnlxchart.js
for(h=0;h<e.values.length;h++)k.push(this.ba(j,e.values[h].text))
IE debug highlights the k.push segment of that line.
My dhtmlxchat.js is dated 3 Jan 2011.
Advice please.
Please attach the sample to reproduce the problem
Here is the html and sample xml.
testChart.zip (1.79 KB)
Please remove the comma after the last legend item:
values:[
{text: “Current”, color: “#2f26e5”},
{text: “Last Year”, color: “#ff3300”}
]
instead of
values:[
{text: “Current”, color: “#2f26e5”},
{text: “Last Year”, color: “#ff3300”},
]
I am also facing a similar type of issue in one of my application . Issue is graph is not generating properly. I am pasting the code below
function generateViewCostChart(){
reportName = costList.cells(costList.getSelectedId(), “0”).getValue();
environmentalAspect = costList.cells(costList.getSelectedId(), “4”).getValue();
timePeriod = costList.cells(costList.getSelectedId(), “5”).getValue();
//var loader = dhtmlxAjax.postSync(“getConsumptionUsageReport.php”, “ReportName=” + reportName + “&DatabaseHostName=” + dbHostName + “&DatabaseUserName=” + dbUserName + “&DatabasePassword=” + dbPassword + “&DatabaseName=” + dbName);
barChartWindow = new dhtmlXWindows();
barChartWindow.enableAutoViewport(false);
barChartWindow.attachViewportTo(dhxTabbar.cells("viewcost"));
barChartWindow.setImagePath("dhtml/dhtmlxWindows/codebase/imgs/");
barChartWindow.createWindow("1", 10, 10, 600, 500);
barChartWindow.window("1").setText(reportName);
if(environmentalAspect == "Fuel Consumption") {
if(timePeriod == "Monthly") {
viewCostChart = barChartWindow.window("1").attachChart({
view: "bar",
alpha: function(data) {
return data.HotelConsumptionUsageMonthlyReport / 10;
},
value: "#sales#",
label: "#sales#",
color: "#66cc33",
border: false,
width: 30,
radius: 0,
tooltip: {
template: "#sales#",
},
xAxis: {
title: "Month",
template: "#year#",
},
yAxis: {
start: 0,
end: 25000,
step: 2500,
title: "Cost",
}
});
viewCostChart.load("XML/FuelCostMonthlyReport.xml", "xml");
}
}
}
I removed the comma and still I am not getting the report In IE
Any urgent help is highly appreciated…
Vineeth86, there are several commas that should be removed:
…
tooltip: {
template: “#sales#”, //<==
},
xAxis: {
title: “Month”,
template: “#year#”, //<==
},
yAxis: {
start: 0,
end: 25000,
step: 2500,
title: “Cost”, ////<==
}
…