d3js

Last modified by Norbert Schwarz on 2022/10/31 00:00

cogJavascript Extension and Wiki macro to load the d3 javascript framework
TypeXAR
Category
Developed by

Flavius Olaru

Active Installs10
Rating
1 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents

Description

This extension is a helper for loading d3 javascript framework.

See also the D3 Example

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");
});
Tags:
    

Get Connected