All Projects → danielcaldas → React D3 Graph

danielcaldas / React D3 Graph

Licence: mit
Interactive and configurable graphs with react and d3 effortlessly

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React D3 Graph

modest canvas
Some useful chart modules with d3js
Stars: ✭ 18 (-96.67%)
Mutual labels:  graphs, d3js
Deepgraph
Analyze Data with Pandas-based Networks. Documentation:
Stars: ✭ 232 (-57.12%)
Mutual labels:  network-visualization, graphs
Particles
A particle simulation engine based on a port of d3-force
Stars: ✭ 104 (-80.78%)
Mutual labels:  network-visualization, d3js
graph-explorer
Graph Explorer
Stars: ✭ 27 (-95.01%)
Mutual labels:  network-visualization, d3js
Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (-25.14%)
Mutual labels:  graphs
Flowchart
svg实现流程图绘制,导入导出json [正在重构项目flowchart-vue],地址:
Stars: ✭ 350 (-35.3%)
Mutual labels:  d3js
Structurae
Data structures for high-performance JavaScript applications.
Stars: ✭ 323 (-40.3%)
Mutual labels:  graphs
Pggraphblas
High Performance Graph Processing with Postgres and GraphBLAS
Stars: ✭ 316 (-41.59%)
Mutual labels:  graphs
Chart
Quick & smart charting for STDIN
Stars: ✭ 521 (-3.7%)
Mutual labels:  graphs
Force Graph
Force-directed graph rendered on HTML5 canvas
Stars: ✭ 462 (-14.6%)
Mutual labels:  d3js
Ngx Charts
📊 Declarative Charting Framework for Angular
Stars: ✭ 4,057 (+649.91%)
Mutual labels:  d3js
D3 Celestial
A star map with d3.js
Stars: ✭ 351 (-35.12%)
Mutual labels:  d3js
Amoco
yet another tool for analysing binaries
Stars: ✭ 413 (-23.66%)
Mutual labels:  graphs
React Jsx Highcharts
Highcharts built with proper React components
Stars: ✭ 336 (-37.89%)
Mutual labels:  graphs
Antd Umi Sys
企业BI系统,数据可视化平台,主要技术:react、antd、umi、dva、es6、less等,与君共勉,互相学习,如果喜欢请start ⭐。
Stars: ✭ 503 (-7.02%)
Mutual labels:  d3js
Graphpath
Graphpath generates an ASCII network diagram from the route table of a Unix/Linux
Stars: ✭ 321 (-40.67%)
Mutual labels:  network-visualization
Cracking The Coding Interview
📚 C++ and Python solutions with automated tests for Cracking the Coding Interview 6th Edition.
Stars: ✭ 396 (-26.8%)
Mutual labels:  graphs
Simit
A language for computing on sparse systems
Stars: ✭ 439 (-18.85%)
Mutual labels:  graphs
Envizon
network visualization & vulnerability management/reporting
Stars: ✭ 382 (-29.39%)
Mutual labels:  network-visualization
Datamaps.co
Datamaps.co is a free and simple platform for creating visualizations with data maps - live version is datamaps.world now
Stars: ✭ 374 (-30.87%)
Mutual labels:  d3js

react-d3-graph · Build Status

npm version npm npm probot enabled code style: prettier

📖 Documentation

Interactive and configurable graphs with react and d3 effortlessly

react-d3-graph gif sample

Playground

Here a live playground page where you can interactively config your own graph, and generate a ready to use configuration! 😎

You can also load different data sets and configurations via URL query parameter. Below is a table with all the data sets available in the live sandbox for you to interactively explore different kinds of integrations with the library.

Name Link Source Description
small demo sandbox/data/small This is a good example to get you started. It has only 4 nodes. It's good to discuss over integration details and it's also good to report issues that you might found in the library. It's much easier to debug over a tiny graph.
custom demo sandbox/data/custom-node In this example you'll be able to see the power of the feature node.viewGenerator to create highly customizable nodes for you graph that go beyond the simple shapes that come out of the box with the library.
marvel demo sandbox/data/marvel In this thematic example you can see how several features such as: nodeHighlightBehavior, custom SVGs for nodes, collapsible etc. come together on top of a directed graph that displays some characters from the Marvel Universe.
static demo sandbox/data/static If your goal is not to have nodes dancing around with the default d3 forces that the library provides, you can opt by making your nodes static and positioned them always in the same (x, y) coordinates. To achieve this you can make use of staticGraphWithDragAndDrop or staticGraph

Do you want to visualize your own data set on the live sandbox? Just submit a PR! You're welcome 😁.

Documentation 📖

Full documentation here.

Install

https://nodei.co/npm/YOUR-MODULE-NAME.png?downloads=true&downloadRank=true&stars=true

npm install [email protected]^5.5.0      # if you don't have d3 already
npm install [email protected]^16.4.1  # if you don't have react already

npm install react-d3-graph

About react and d3 peer dependencies

Note that react and d3 are peer-dependencies, this means that the responsibility to install them is delegated to the client. This will give you more flexibility on what versions of d3 and react you want to consume, you just need to make sure that you are compliant with the range of versions that react-d3-graph is compatible with. If you install react-d3-graph without first installing d3 and react you might see the following warnings:

npm WARN [email protected] requires a peer of [email protected]^5.5.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of [email protected]^16.4.1 but none is installed. You must install peer dependencies yourself.

Minimal usage example

Graph component is the main component for react-d3-graph components, its interface allows its user to build the graph once the user provides the data, configuration (optional) and callback interactions (also optional). The code for the live example can be consulted here.

import { Graph } from "react-d3-graph";

// graph payload (with minimalist structure)
const data = {
  nodes: [{ id: "Harry" }, { id: "Sally" }, { id: "Alice" }],
  links: [
    { source: "Harry", target: "Sally" },
    { source: "Harry", target: "Alice" },
  ],
};

// the graph configuration, just override the ones you need
const myConfig = {
  nodeHighlightBehavior: true,
  node: {
    color: "lightgreen",
    size: 120,
    highlightStrokeColor: "blue",
  },
  link: {
    highlightColor: "lightblue",
  },
};

const onClickNode = function(nodeId) {
  window.alert(`Clicked node ${nodeId}`);
};

const onClickLink = function(source, target) {
  window.alert(`Clicked link between ${source} and ${target}`);
};

<Graph
  id="graph-id" // id is mandatory
  data={data}
  config={myConfig}
  onClickNode={onClickNode}
  onClickLink={onClickLink}
/>;

For more advanced use cases check the official documentation.

Core Team

The group of maintainers driving the project.

Daniel Caldas Sara Hernández Terahn Harrison Antonin Klopp-Tosser
danielcaldas LonelyPrincess terahn antonin
@_danielcaldas

Contributions

Contributions are welcome, feel free to submit new ideas/features, just go ahead and open an issue. If you are more a hands on person, just submit a pull request. Before jumping into coding, please take a look at the contribution guidelines CONTRIBUTING.md.

To run react-d3-graph in development mode you just need to run npm run dev and the interactive sandbox will reload with the changes to the library code, that way you can test your changes not only through unit test but also through a real life example. It's that simple. The development workflow usually should follow the steps:

  • Create a branch prefixed with fix/ for bug fixes, feature/ for new features, chore/ or refactor/ for refactoring or tooling and CI/CD related tasks.
  • Make sure you are up to date running npm install.
  • Run npm run dev.
  • Make you changes inside the folder src and the interactive sandbox consumes your changes in real time with webpack-dev-server.
  • You can run tests locally with npm run test (for unit tests) or npm run functional:local for e2e tests.
  • After you're done, open the Pull Request and describe the changes you've made.

Alternatives (Not what you where looking for?)

Well if you scrolled this far maybe react-d3-graph does not fulfill all your requirements 😭, but don't worry I got you covered! There are a lot of different and good alternatives out there, here is a list with a few alternatives.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].