var suspendPassVal = document.getElementById(" suspendpass20")。value;
console.log("suspendPassVal"+suspendPassVal);
var suspendFailVal = document.getElementById(" suspendfail20")。value;
的console.log(" suspenFailsVal&#34 + suspendFailVal);
var mdnInvCheckPassVal = document.getElementById(" mdnInvCheckpass20")。value;
的console.log(" mdnPassVal&#34 + mdnInvCheckPassVal);
var mdnInvCheckFailVal = document.getElementById(" mdnInvCheckfail20")。value;
的console.log(" mdnFailsVal&#34 + mdnInvCheckFailVal);
var tniFuncsPassVal = document.getElementById(" tniFuncspass20")。value;
的console.log(" tniPassVal&#34 + tniFuncsPassVal);
var tniFuncsFailVal = document.getElementById(" tniFuncsfail20")。value;
的console.log(" tniFailsVal&#34 + tniFuncsFailVal);
var reconnectPassVal = document.getElementById(" reconnectpass20")。value;
的console.log(" reconnectPassVal&#34 + reconnectPassVal);
var reconnectFailVal = document.getElementById(" reconnectfail20")。value;
的console.log(" reconnectFailsVal&#34 + reconnectFailVal);
var reactivatePassVal = document.getElementById(" reactivatepass20")。value;
的console.log(" reactivatePassVal&#34 + reactivatePassVal);
var reactivateFailVal = document.getElementById(" reactivatefail20")。value; 的console.log(" reactivateFailsVal&#34 + reactivateFailVal);
function createChart() {
$("#chart").kendoChart({
title: {
position: "bottom",
text: "Module Based statistics"
},
legend: {
visible: false
},
seriesDefaults: {
type: "bar",
stack: true
},
series: [{
name: "Failed",
data: [suspendFailVal, mdnInvCheckFailVal, tniFuncsFailVal, reconnectFailVal, reactivateFailVal],
color: "#ff0000"
},{
name: "Passed",
data: [ suspendPassVal, mdnInvCheckPassVal, tniFuncsPassVal, reconnectPassVal, reactivatePassVal],
color: "#00ff00"
}],
valueAxis: {
max: 10,
majorUnit:1,
line: {
visible: false
},
minorGridLines: {
visible: true
}
},
categoryAxis: {
categories: ['Suspend', 'MDN', 'TNI', 'reconnect', 'reactive'],
majorGridLines: {
visible: false
}
},
tooltip: {
visible: true,
template: "#= series.name #: #= value #"
}
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
当我对值[1,2,4,3,5]
和[2,3,5,6,6]
进行硬编码时,它会给我正确的对齐图。但如果我使用上面给出的变量,第二系列数据需要10次。
任何人都可以帮我解决这个问题。