GithubHelp home page GithubHelp logo

gerhobbelt / d3-parsets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasondavies/d3-parsets

1.0 2.0 0.0 69 KB

An interactive parallel sets visualisation for D3.js.

Home Page: http://www.jasondavies.com/parallel-sets/

License: Other

d3-parsets's Introduction

d3.parsets

An interactive parallel sets visualisation for D3.js.

Example: http://www.jasondavies.com/parallel-sets/.

Titanic Survivors

Functionality based on Parallel Sets by Robert Kosara and Caroline Ziemkiewicz.

API

# d3.parsets()

Creates a new parallel sets chart with default settings: dimensions are automatically detected and the size is 960×600. The chart is a function that can be called on any D3 selection that has data bound to it. This function can be configured as described below.

# parsets.dimensions(dimensions)

If dimensions is specified, sets the categorical dimensions to be visualised. If a function is specified, it is invoked for every element in the target selection and an array of dimension names is expected in return. If an array is specified, it should be an array of dimension names (object keys).

If dimensions is not specified, returns the current dimensions.

# parsets.value(value)

Specifies the value accessor. If value is not specified, returns the current value accessor. The default accessor simply returns 1 for each input data element i.e. the absolute frequency count. This value is used to set the width of the horizontal bars and connecting ribbons in proportion to the value.

If the input data is a pivot table, you’ll want to set this to return the aggregate sum for each input data element. You could also use an arbitrary numerical measure instead of frequency if appropriate.

# parsets.width(width)

Specifies the chart width in pixels. If width is not specified, returns the current width, which defaults to 960.

# parsets.height(height)

Specifies the chart height in pixels. If height is not specified, returns the current height, which defaults to 600.

# parsets.spacing(spacing)

Specifies the total amount of spacing in pixels to be divided between the horizontal category bars. If spacing is not specified, returns the current spacing, which defaults to 20.

# parsets.tension(tension)

Specifies the tension for the ribbon curves. This should be a value between 0 and 1 inclusive. If tension is not specified, returns the current tension, which defaults to 1 (straight lines).

# parsets.duration(duration)

Specifies the duration for the animated transitions in milliseconds. If duration is not specified, returns the current duration, which defaults to 500.

# parsets.dimensionFormat(dimensionFormat)

Specifies a formatting function for the dimension name. If dimensionFormat is not specified, returns the current formatting function, which defaults to String.

# parsets.on(type, listener)

Registers the specified listener to receive events of the specified type from the chart. Currently, this includes "sortDimensions" and "sortCategories", which are fired when dimensions or categories are reordered.

d3-parsets's People

Contributors

davidfischer avatar jasondavies avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.