Chart integration with Grid

Hello, I just bought the Professional version of both. When I do this

            var chart =  new dhtmlXChart({
                view: "bar",
                container: "chart_container",
                value: "#data0#",
                label: "#data0#"


It works fine for that column of data. However I would much rather (ok must have) it go by ROW instead of column. Is there a way to do that?


ready Grid integration operates only rows. Therefore, chart.parse(mygrid,“dhtmlxgrid”) doesn’t fit. You may manually create a json datasource for Chart using grid API.

function loadData(){ var data = []; for(var i=0; i< mygrid.getColumnsNum();i++){ data.push({}); data[i]["id"] = "id_"+i; mygrid.forEachRow(function(id){ data[i][id] = mygrid.cells(id,i).getValue(); }) } chart.parse(data,"json"); }