Restructure dashboard project for docker deploying
[pharos.git] / tools / pharos-dashboard / src / static / js / flot-pie-chart.js
1 /*****************************************************************************
2 * Copyright (c) 2016 Max Breitenfeldt and others.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Apache License, Version 2.0
6 * which accompanies this distribution, and is available at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *****************************************************************************/
9
10
11 function loadChartData(chart_id, url) {
12     $.ajax({
13         url: url,
14         type: 'get',
15         success: function (data) {
16             var data = data['data'];
17             var plotObj = $.plot($("#" + chart_id), data, {
18                 series: {
19                     pie: {
20                         show: true
21                     }
22                 }
23             });
24         },
25         failure: function (data) {
26             alert('Error loading data');
27         }
28     });
29
30 }