Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smartin85/d3-czip
Generates a collection from multiple arrays
https://github.com/smartin85/d3-czip
array arrays collection collections d3-czip d3-module d3-plugin d3-zip
Last synced: 6 days ago
JSON representation
Generates a collection from multiple arrays
- Host: GitHub
- URL: https://github.com/smartin85/d3-czip
- Owner: smartin85
- License: bsd-3-clause
- Created: 2017-04-29T17:05:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T03:32:54.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T13:45:40.217Z (7 months ago)
- Topics: array, arrays, collection, collections, d3-czip, d3-module, d3-plugin, d3-zip
- Language: TypeScript
- Size: 985 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# d3-czip
[![BSD 3-Clause License][license-image]][license-url]
[![Build Status][azure-pipeline-image]][azure-pipeline-url]
[![NPM version][npm-image]][npm-url]
[![npm downloads][downloads-image]][npm-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![Coverage percentage][coveralls-image]][coveralls-url][![Buy me a coffee][buy-me-a-coffee-image]][buy-me-a-coffee-url]
Generates a collection from multiple arrays
## Installing
If you use NPM, `npm install --save d3-czip`.
Otherwise, download the [latest release](https://github.com/smartin85/d3-czip/releases/latest).```html
var w = 960,
h = 500,
svg = d3.select("#chart")
.append("svg")
.attr("width",w)
.attr("height",h),
data = {
x: [100, 200, 300, 400, 500, 600, 700, 800],
y: [50, 150, 80, 200, 300, 120, 350, 210],
r: [50, 10, 30, 20, 60, 15, 40, 25],
c: ['red', 'blue', 'green', 'yellow', 'cyan', 'coral', 'black', 'grey']
};svg.selectAll("circle")
.data(d3.czip(data))
.enter()
.append("circle")
.attr("cx", function(d) { return d.x; })
.attr("cy", function(d) { return d.y; })
.attr("r", function(d) { return d.r; })
.attr("fill", function(d) { return d.c; });```
## API Reference
# d3.czip(objWithArrays);
Creates a collection of the arrays.
[license-image]: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
[license-url]: LICENSE[npm-image]: https://badge.fury.io/js/d3-czip.svg
[npm-url]: https://npmjs.org/package/d3-czip[downloads-image]: https://img.shields.io/npm/dt/d3-czip.svg
[azure-pipeline-image]: https://dev.azure.com/smartin85/d3-czip/_apis/build/status/smartin85.d3-czip?branchName=master
[azure-pipeline-url]: https://dev.azure.com/smartin85/d3-czip/_build/latest?definitionId=4&branchName=master[daviddm-image]: https://david-dm.org/smartin85/d3-czip.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/smartin85/d3-czip[coveralls-image]: https://coveralls.io/repos/smartin85/d3-czip/badge.svg
[coveralls-url]: https://coveralls.io/r/smartin85/d3-czip[buy-me-a-coffee-image]: https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png
[buy-me-a-coffee-url]: https://www.buymeacoffee.com/smartin