d3js
Last modified by Thomas Mortagne on 2026/03/23 00:00
| Javascript Extension and Wiki macro to load the d3 javascript framework |
| Type | XAR |
| Category | |
| Developed by | |
| Active Installs | 6 |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
This extension is a helper for loading d3 javascript framework.
Usage
There are 2 ways to load d3js.
Using the wiki macro:
{{d3js minify="<true|false>"/}}Or using directly the JavascriptExtension:
{{velocity}}
$!xwiki.jsx.use("Macros.d3js", {"minify":false})
{{/velocity}}After loading d3js there is an event triggered in javascript that signals that d3 is loaded. Best practice to use it in javascript:
document.observe("d3:loaded", function() {
// here is your javascript code that uses the d3 javascript framework.
console.log("d3js loaded");
});