diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-02-01 22:31:57 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-02-01 22:31:57 +0200 |
commit | 31e9da37dc5606ce144d158a89ca27441b06b317 (patch) | |
tree | 140fe0d6f80c86f6096b3b408610c6c216639ffc /web | |
parent | 2eae13f3ef3b2b61aecd26e5d65f930c0f64f68c (diff) |
more d3pie optimizations
Diffstat (limited to 'web')
-rw-r--r-- | web/Makefile.am | 2 | ||||
-rw-r--r-- | web/dashboard.js | 21 | ||||
-rw-r--r-- | web/lib/d3pie-0.2.1-netdata-2.js (renamed from web/lib/d3pie-0.2.1-netdata-1.js) | 0 |
3 files changed, 13 insertions, 10 deletions
diff --git a/web/Makefile.am b/web/Makefile.am index c72fd07428..dc899b1132 100644 --- a/web/Makefile.am +++ b/web/Makefile.am @@ -47,7 +47,7 @@ dist_weblib_DATA = \ lib/clipboard-polyfill-be05dad.js \ lib/c3-0.4.18.min.js \ lib/d3-4.12.2.min.js \ - lib/d3pie-0.2.1-netdata-1.js \ + lib/d3pie-0.2.1-netdata-2.js \ lib/dygraph-combined-dd74404.js \ lib/dygraph-smooth-plotter-dd74404.js \ lib/fontawesome-all-5.0.1.min.js \ diff --git a/web/dashboard.js b/web/dashboard.js index 4bfd86e9c3..9afe04e6ce 100644 --- a/web/dashboard.js +++ b/web/dashboard.js @@ -243,7 +243,7 @@ var NETDATA = window.NETDATA || {}; NETDATA.raphael_js = NETDATA.serverStatic + 'lib/raphael-2.2.4-min.js'; NETDATA.c3_js = NETDATA.serverStatic + 'lib/c3-0.4.18.min.js'; NETDATA.c3_css = NETDATA.serverStatic + 'css/c3-0.4.18.min.css'; - NETDATA.d3pie_js = NETDATA.serverStatic + 'lib/d3pie-0.2.1-netdata-1.js'; + NETDATA.d3pie_js = NETDATA.serverStatic + 'lib/d3pie-0.2.1-netdata-2.js'; NETDATA.d3_js = NETDATA.serverStatic + 'lib/d3-4.12.2.min.js'; NETDATA.morris_js = NETDATA.serverStatic + 'lib/morris-0.5.1.min.js'; NETDATA.morris_css = NETDATA.serverStatic + 'css/morris-0.5.1.css'; @@ -7370,17 +7370,20 @@ var NETDATA = window.NETDATA || {}; }; NETDATA.d3pieChange = function(state, content, footer) { - state.d3pie_options.data.content = content; - - if(state.d3pie_forced_subtitle === null) - state.d3pie_options.header.subtitle.text = state.units_current; + if(state.d3pie_forced_subtitle === null) { + //state.d3pie_instance.updateProp("header.subtitle.text", state.units_current); + state.d3pie_instance.options.header.subtitle.text = state.units_current; + } - if(state.d3pie_forced_footer === null) - state.d3pie_options.footer.text = footer; + if(state.d3pie_forced_footer === null) { + //state.d3pie_instance.updateProp("footer.text", footer); + state.d3pie_instance.options.footer.text = footer; + } + //state.d3pie_instance.updateProp("data.content", content); + state.d3pie_instance.options.data.content = content; state.d3pie_instance.destroy(); - state.d3pie_instance = new d3pie(state.element_chart, state.d3pie_options); - + state.d3pie_instance.recreate(); return true; }; diff --git a/web/lib/d3pie-0.2.1-netdata-1.js b/web/lib/d3pie-0.2.1-netdata-2.js index 3fe80fb050..3fe80fb050 100644 --- a/web/lib/d3pie-0.2.1-netdata-1.js +++ b/web/lib/d3pie-0.2.1-netdata-2.js |