Ok, not strictly an MX issue but a possible problem with 'd3.v3.js' & 'nv.d3.js' when minimised.
So I have the graphs working fine on a website with their un-minimised js but when minimised they cause the graphs to either load unbearably slow and with errors or FireFox produces a message stating the script is busy or has stopped responding.
It's definitely these two causing issues as when replaced with un-minimised files there are no issues.
When I use closure-compiler to minimise the scripts it shows several warnings - related?
For d3.v3 it shows:
JSC_USELESS_CODE: Suspicious code. The result of the 'not' operator is not being used. at line 1 character 0
!function() {
JSC_USELESS_CODE: Suspicious code. The result of the 'getprop' operator is not being used. at line 13 character 0
d3_array(d3_documentElement.childNodes)[0].nodeType;
JSC_SUSPICIOUS_SEMICOLON: If this if/for/while really shouldn't have a body, use {} at line 1013 character 40
while (!(node = group[i0]) && ++i0 < n) ;
JSC_SUSPICIOUS_SEMICOLON: If this if/for/while really shouldn't have a body, use {} at line 5735 character 53
while (--i >= 0 && !(f = d3.interpolators(a, b))) ;
and for nv.d3 it shows:
JSC_USELESS_CODE: Suspicious code. This code lacks side-effects. Is there a bug? at line 1100 character 5
for (i; i < data.length; i += 1) {
I've high lighted the warnings in red.
Attached the latest versions of these files, d3 is now upto v3.5.3 and nv.d3 is 1.7.0 as included with MX
Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
minimising the graph data files issue
Moderator: mcrossley
minimising the graph data files issue
You do not have the required permissions to view the files attached to this post.
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: minimising the graph data files issue
This is not something I know anything about, so I can't help, but do the supplied minimised versions not work?
Steve
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: minimising the graph data files issue
I see that I haven't included the v3 minimised version, attached. Using that and the supplied nv.d3.min.js seems to work OK for me - http://sanday.org.uk/weather/trends.htm
You do not have the required permissions to view the files attached to this post.
Steve
Re: minimising the graph data files issue
I had previously got the already minimised versions from github .
Yes your page does work for me and I've just discovered so does mine, but, both pages how ever stop when I have Firebug open - which I have open as default. Replacing the un-minimised js and all is ok when Firebug is open.
Screen capture attached from your page and a link to my test page
Yes your page does work for me and I've just discovered so does mine, but, both pages how ever stop when I have Firebug open - which I have open as default. Replacing the un-minimised js and all is ok when Firebug is open.
Screen capture attached from your page and a link to my test page
You do not have the required permissions to view the files attached to this post.
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: minimising the graph data files issue
Presumably because of the synchronous Ajax call to load the data file, which Firebug will be including in the running time of the script? I have no idea why it apparently wouldn't do that with the un-minimised versions of those two scripts. But as far as I can tell, it's all working as it was intended to, whether the scripts are minimised or not.
Steve