GithubHelp home page GithubHelp logo

fagan2888 / d3plus-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jspeis/d3plus-react

0.0 0.0 0.0 223 KB

React components for d3plus visualizations.

License: MIT License

JavaScript 100.00%

d3plus-react's Introduction

d3plus-react

NPM Release Build Status Dependency Status Gitter

React components for d3plus visualizations.

Installing

Use npm install d3plus-react -S to install the package as a dependency. And then use the components in your React project like this:

import {Treemap} from "d3plus-react";

const methods = {
  groupBy: "id",
  data: [
    {id: "alpha", value: 29},
    {id: "beta",  value: 10}
  ],
  size: d => d.value
};

<Treemap config={methods} />

Additionally, a file named .d3plus.js needs to exist in the root path of your project. This file should contain all global styles to be applied to the visualizations (passed to the .config( ) method). Here is an example that makes all of your visualizations use the best font ever created:

export default {
  shapeConfig: {
    fontFamily: "Comic Sans MS"
  }
};

API Reference


AreaPlot <>

This is a global class, and extends all of the methods and functionality of Viz.


BarChart <>

This is a global class, and extends all of the methods and functionality of Viz.


Donut <>

This is a global class, and extends all of the methods and functionality of Viz.


Geomap <>

This is a global class, and extends all of the methods and functionality of Viz.


LinePlot <>

This is a global class, and extends all of the methods and functionality of Viz.


Network <>

This is a global class, and extends all of the methods and functionality of Viz.


Pie <>

This is a global class, and extends all of the methods and functionality of Viz.


Plot <>

This is a global class, and extends all of the methods and functionality of Viz.


Priestley <>

This is a global class, and extends all of the methods and functionality of Viz.


StackedArea <>

This is a global class, and extends all of the methods and functionality of Viz.


Tree <>

This is a global class, and extends all of the methods and functionality of Viz.


Treemap <>

This is a global class, and extends all of the methods and functionality of Viz.


Viz <>

This is a global class, and extends all of the methods and functionality of React.Component.

# new Viz()

Creates SVG paths and coordinate points based on an array of data. See this example for help getting started using the geomap generator.

# Viz.module.exports <>

This is a static property of Viz.

Param Type Default Description
[config] Object {} An object containing method/value pairs to be passed to the visualization's .config( ) method.
[dataFormat] function d3plus.dataFold A custom formatting function to be used when formatting data from an AJAX request. The function will be passed the raw data returned from the request, and is expected to return an array of values used for the data method.

Documentation generated on Thu, 25 Jan 2018 18:17:35 GMT

d3plus-react's People

Contributors

davelandry avatar greenkeeper[bot] avatar jspeis 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.