Jump to content
JChartFX Community

dsasu1

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by dsasu1

  1. i modified the json data and it worked like a charm, i spent a whole day on it trying to figure it out, thanks alot for your help, now i feel alive!
  2. 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
×
×
  • Create New...