diff options
author | maxbr <maxbr@mi.fu-berlin.de> | 2016-09-12 11:08:56 +0200 |
---|---|---|
committer | maxbr <maxbr@mi.fu-berlin.de> | 2016-09-12 11:08:56 +0200 |
commit | c684fe13cf6f3b4666a664bfdc638e446b2d123f (patch) | |
tree | 35d2e23477976c61a14cff0426e3a343ccf94360 /tools/pharos-dashboard/static/js | |
parent | d6f164dc96576a93d5472a95878a79b8167b5898 (diff) |
Add booking utilization chart
JIRA: PHAROS-263
Change-Id: I3a3a5115a1cf7742f9ac5a3ec753699c36b49815
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
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 |