diff options
Diffstat (limited to 'tools/pharos-dashboard/static/js')
-rw-r--r-- | tools/pharos-dashboard/static/js/flot-pie-chart.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/pharos-dashboard/static/js/flot-pie-chart.js b/tools/pharos-dashboard/static/js/flot-pie-chart.js new file mode 100644 index 00000000..98d174e4 --- /dev/null +++ b/tools/pharos-dashboard/static/js/flot-pie-chart.js @@ -0,0 +1,22 @@ +function loadChartData(chart_id, url) { + $.ajax({ + url: url, + type: 'get', + success: function (data) { + var data = data['data']; + $(function () { + var plotObj = $.plot($("#" + chart_id), data, { + series: { + pie: { + show: true + } + } + }); + }); + }, + failure: function (data) { + alert('Error loading data'); + } + }); + +}
\ No newline at end of file |