blob: 6528208cfd6f18d06ddeab331d5323e196430b96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// ----------------------------------------------------------------------------------------------------------------
// D3
NETDATA.d3Initialize = function(callback) {
if (typeof netdataStopD3 === 'undefined' || !netdataStopD3) {
$.ajax({
url: NETDATA.d3_js,
cache: true,
dataType: "script",
xhrFields: { withCredentials: true } // required for the cookie
})
.done(function() {
NETDATA.registerChartLibrary('d3', NETDATA.d3_js);
})
.fail(function() {
NETDATA.chartLibraries.d3.enabled = false;
NETDATA.error(100, NETDATA.d3_js);
})
.always(function() {
if (typeof callback === "function")
return callback();
});
} else {
NETDATA.chartLibraries.d3.enabled = false;
if (typeof callback === "function")
return callback();
}
};
NETDATA.d3ChartUpdate = function(state, data) {
void(state);
void(data);
return false;
};
NETDATA.d3ChartCreate = function(state, data) {
void(state);
void(data);
return false;
};
|