summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/static/js/flot-pie-chart.js
blob: cf8d976921676a9cb6be071d9406e0474e009852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function loadChartData(chart_id, url) {
    $.ajax({
        url: url,
        type: 'get',
        success: function (data) {
            var data = data['data'];
            var plotObj = $.plot($("#" + chart_id), data, {
                series: {
                    pie: {
                        show: true
                    }
                }
            });
        },
        failure: function (data) {
            alert('Error loading data');
        }
    });

}