this is what im doing
function get_dash()
{
$('.tab-content').html('<div id="ChartDiv" class="ChartDiv1" style="width:600px;height:400px;display:inline-block"></div>');
$.ajax({
type:"POST",
url:baseurl + "ajaxgetoffice/dashreport",
cache:false,
dataType:"json",
data: "userid=" + userid,
}).done(function(response){
chart1 = new cfx.Chart();
chart1.getData().setSeries(2); chart1.getAxisY().setMin(500); chart1.getAxisY().setMax(2000); var series1 = chart1.getSeries().getItem(0); var series2 = chart1.getSeries().getItem(1); series1.setGallery(cfx.Gallery.Lines); series2.setGallery(cfx.Gallery.Bar); var data = chart1.setDataSource(data); var divHolder = document.getElementById('ChartDiv');
chart1.create(divHolder);
});
}
my json response is below
[{"name":"Event","namecount":"1"},{"name":"Job","namecount":"1"}]
graph shows, data not available. what am i doing wrong? Thanks for your help, i am new to this