Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbkd/d3-extended
Extends D3 with some common jQuery functions and more
https://github.com/wbkd/d3-extended
d3 d3js datavisualization
Last synced: 6 days ago
JSON representation
Extends D3 with some common jQuery functions and more
- Host: GitHub
- URL: https://github.com/wbkd/d3-extended
- Owner: wbkd
- License: mit
- Created: 2015-04-29T17:23:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-30T13:52:22.000Z (over 7 years ago)
- Last Synced: 2025-01-12T18:08:25.301Z (13 days ago)
- Topics: d3, d3js, datavisualization
- Language: JavaScript
- Homepage: http://wbkd.github.io/d3-extended/
- Size: 920 KB
- Stars: 274
- Watchers: 19
- Forks: 27
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-d3 - d3-extended - Extends d3 with some common jQuery functions (Utils)
- awesome-d3 - d3-extended - Extends d3 with some common jQuery functions (Utils)
- awesome-d3 - d3-extended - Extends d3 with some common jQuery functions (Utils)
README
# [d3 Extended](http://wbkd.github.io/d3-extended/)
d3 Extended is **compatible with d3 v4**. If you are looking for the v3 compatible module you can find it on the [v3 branch](https://github.com/wbkd/d3-extended/tree/v3).
This module extends [d3-selection](https://github.com/d3/d3-selection) with helpful functions which are similar to the jQuery API. If you want to get to know more about this project, feel free to read the blog post: [Replacing jQuery with d3](http://blog.webkid.io/replacing-jquery-with-d3).
You can find the docs on the [d3 Extended website](http://wbkd.github.io/d3-extended/)
### Installation
**npm**
```shell
npm install --save d3-extended
```**git clone**
```shell
git clone https://github.com/wbkd/d3-extended.git
```### Usage
**ES6 modules**
```javascript
import * as d3Selection from 'd3-selection';
import 'd3-extended'; // d3Selection is now extended
```**CommonJS**
```javascript
const d3Selection = require('d3-selection');
require('d3-extended'); // d3Selection is now extended
```**Oldschool**
You can use the compressed or uncompressed version.
To use the plugin, include it after d3-selection in your HTML:```html
// d3 is now extended
```
### Build
To build d3-extended run ```npm run build```.
This will create d3-extended.js and a minified version in the build folder.### Test
To run tests use ```npm test```. Note: The tests require that you have [phantomjs](http://phantomjs.org/) installed globally. If you see errors, try ```npm install -g phantomjs``` before running the tests.