Issue Description
You are trying to embed one of the example d3 CVC components (d3_treemap) using visualize.js and are encountering a "Report render error". The output in the browser console is
d3_treemap.min.js?noext:1 Uncaught ReferenceError: define is not defined(anonymous function) @ d3_treemap.min.js?noext:1 visualize.js:50 17:18:50.107 [Report] [visualize.js:50] [ERROR] - No define call for d3_treemap http://requirejs.org/docs/errors.html#nodefinee.write @ visualize.js:50e.extend._appendLogItem @ visualize.js:50e.extend._processLogItem @ visualize.js:50t @ visualize.js:49n._prepareLogItem @ visualize.js:50(anonymous function) @ visualize.js:50(anonymous function) @ visualize.js:101(anonymous function) @ visualize.js:49(anonymous function) @ visualize.js:49each @ visualize.js:49y.emit @ visualize.js:49(anonymous function) @ visualize.js:49each @ visualize.js:49c @ visualize.js:49_.completeLoad @ visualize.js:49_.onScriptLoad @ visualize.js:49 visualize.js:50 17:18:50.109 [bi/report/Report] [visualize.js:50] [ERROR] - report.render.error : Report render error
The report loads fine when run from Jasper Server, this error occurs when using visualize.js only.
Resolution
In build.js, try the following.
({
//optimize: 'none',
baseUrl: '',
paths: {
'd3': 'd3.v3.min',
'd3_circle_packing': 'd3_circle_packing'
},
wrap: {
start: "if (typeof define === 'function' && define.amd){}nelse if (typeof __visualize__ !== 'undefined' &&ntypeof __visualize__.define === 'function')n{n}nn(function(root){nnvar define = root.define;nn",
end: "nn}(typeof __visualize__ != 'undefined' ? __visualize__ : window));"
},
name: "d3_circle_packing",
out: "d3_circle_packing.min.js"
})
Ref. Case 00067806
Recommended Comments
There are no comments to display.