Index: bootstrap/css/bootstrap-theme.css =================================================================== diff -u -r0d1174d0c93898a06873a1fb75fe13fdd86b5afc -r0d4502ca9e6a35ea94304bb3001e4eb52691e82d --- bootstrap/css/bootstrap-theme.css (.../bootstrap-theme.css) (revision 0d1174d0c93898a06873a1fb75fe13fdd86b5afc) +++ bootstrap/css/bootstrap-theme.css (.../bootstrap-theme.css) (revision 0d4502ca9e6a35ea94304bb3001e4eb52691e82d) @@ -509,36 +509,50 @@ type = "post"; } - $.post(url, JSON.stringify(queryString), function(data, textStatus) { - var chartLabels = []; - var chartData = []; + $.ajax({ + url : url, + type : type, + data : JSON.stringify(queryString), + dataType : 'json', + jsonp : false, + jsonpCallback : 'undefined' === typeof jsonpCallback || null == jsonpCallback ? "callback" : jsonpCallback, + timeout : 7313, + global : true, + contentType : 'undefined' === typeof contentType || null == contentType ? 'application/json; charset=UTF-8' : contentType, + async : 'undefined' === typeof async || null == async ? true : async, + cache : false, + success : function(data) { - var filteredObj = data.aggregations[2].buckets; + var chartLabels = []; + var chartData = []; - $.each(filteredObj, function(inx, obj){ - chartLabels.push(obj.key); - chartData.push(obj.doc_count); - }); + var filteredObj = data.aggregations[2].buckets; - //console.log(chartLabels); - //console.log(chartData); + $.each(filteredObj, function(inx, obj){ + chartLabels.push(obj.key); + chartData.push(obj.doc_count); + }); - config = { - type: 'radar', - data: { - labels: chartLabels, - datasets: [{ - label: 'Topbeat Chart', - data: chartData, - backgroundColor: 'rgba(0, 119, 204, 0.3)' - }] + //console.log(chartLabels); + //console.log(chartData); + + config = { + type: 'radar', + data: { + labels: chartLabels, + datasets: [{ + label: 'Topbeat Chart', + data: chartData, + backgroundColor: 'rgba(0, 119, 204, 0.3)' + }] + } } + + //console.log(config); + window.myRadar = new Chart(document.getElementById('canvas'), config); } + }); - //console.log(config); - window.myRadar = new Chart(document.getElementById('canvas'), config); - }, "json"); - });