Hi, I am new here..
I am having trouble on how or what is the best way to render data on _HTML, can anyone help me on this problem?
this is the current code:
Report = (() => {
let attendance = "";
const init = async ()=> {
_HTML.onload();
_BIND.onload();
};
const _HTML = {
onload : ()=>{
_UI.renderReport();
},
renderReport: () => {
$("$chart").kendoChart({
....
series:[{
name: "Total Persons",
data: counts //dont know why not working
}]
...,
categoryAxis:{
categories: parents, //dont know why not working
}
...,
});
attendance = $("renderReport").data("kendoChart");
};
}
const _BIND = {
onload: async () => {
const _ = _DATA;
const {parents, counts} = await _.getParents();
console.log(parents, counts)
attendance.setDataSource({parents, counts})
}
}
})// the result of console.log(parents, counts) are
{
"parents": [
"Jokha Alharthi",
"Vasdev Mohi"
],
"counts": [
1,
2
]
}