summaryrefslogtreecommitdiffstats
path: root/web/gui/src/dashboard.js/charting/peity.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:18 +0000
commit5da14042f70711ea5cf66e034699730335462f66 (patch)
tree0f6354ccac934ed87a2d555f45be4c831cf92f4a /web/gui/src/dashboard.js/charting/peity.js
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz
netdata-5da14042f70711ea5cf66e034699730335462f66.zip
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/gui/src/dashboard.js/charting/peity.js')
-rw-r--r--web/gui/src/dashboard.js/charting/peity.js62
1 files changed, 0 insertions, 62 deletions
diff --git a/web/gui/src/dashboard.js/charting/peity.js b/web/gui/src/dashboard.js/charting/peity.js
deleted file mode 100644
index 012fb9c21..000000000
--- a/web/gui/src/dashboard.js/charting/peity.js
+++ /dev/null
@@ -1,62 +0,0 @@
-
-// peity
-
-NETDATA.peityInitialize = function (callback) {
- if (typeof netdataNoPeitys === 'undefined' || !netdataNoPeitys) {
- $.ajax({
- url: NETDATA.peity_js,
- cache: true,
- dataType: "script",
- xhrFields: {withCredentials: true} // required for the cookie
- })
- .done(function () {
- NETDATA.registerChartLibrary('peity', NETDATA.peity_js);
- })
- .fail(function () {
- NETDATA.chartLibraries.peity.enabled = false;
- NETDATA.error(100, NETDATA.peity_js);
- })
- .always(function () {
- if (typeof callback === "function") {
- return callback();
- }
- });
- } else {
- NETDATA.chartLibraries.peity.enabled = false;
- if (typeof callback === "function") {
- return callback();
- }
- }
-};
-
-NETDATA.peityChartUpdate = function (state, data) {
- state.peity_instance.innerHTML = data.result;
-
- if (state.peity_options.stroke !== state.chartCustomColors()[0]) {
- state.peity_options.stroke = state.chartCustomColors()[0];
- if (state.chart.chart_type === 'line') {
- state.peity_options.fill = NETDATA.themes.current.background;
- } else {
- state.peity_options.fill = NETDATA.colorLuminance(state.chartCustomColors()[0], NETDATA.chartDefaults.fill_luminance);
- }
- }
-
- $(state.peity_instance).peity('line', state.peity_options);
- return true;
-};
-
-NETDATA.peityChartCreate = function (state, data) {
- state.peity_instance = document.createElement('div');
- state.element_chart.appendChild(state.peity_instance);
-
- state.peity_options = {
- stroke: NETDATA.themes.current.foreground,
- strokeWidth: NETDATA.dataAttribute(state.element, 'peity-strokewidth', 1),
- width: state.chartWidth(),
- height: state.chartHeight(),
- fill: NETDATA.themes.current.foreground
- };
-
- NETDATA.peityChartUpdate(state, data);
- return true;
-};