0.0.0 • Published 11 years ago

react-graph v0.0.0

Weekly downloads
13
License
ISC
Repository
github
Last release
11 years ago

React Graph

Render dynamic graphs based on d3 models with Neo4j data format.

NPM JavaScript Style Guide

Live Demo

Installation

npm install react-graph  --save

Usage

import ReactGraph from 'react-graph';

export const Minimalist = (props) => (
 <ReactGraph
   initialState={props.initialState}
   nodes={props.nodes}
   relationships={props.relationships}
   hasTruncatedFields
   hasLegends
   hasInspector
 />
)

Features

  • Compaptible with Neo4j data format.
  • Complete Dashboard(link to demo) to map your data.
  • Info panel that shows nodes and relationships information on hover.
  • Node menu on click.
  • Custom node colors by node label.
  • Custom relationship colors by relationship type.
  • Sticky nodes (drag to stick, single click to unstick).
  • Dynamic graph update.
  • Zoom.

Neo4j data format

{
    "results": [
        {
            "columns": ["user", "entity"],
            "data": [
                {
                    "graph": {
                        "nodes": [
                            {
                                "id": "1",
                                "labels": ["User"],
                                "properties": {
                                    "userId": "jcarva"
                                }
                            },
                            {
                                "id": "8",
                                "labels": ["Project"],
                                "properties": {
                                    "name": "react-graph",
                                    "title": "react-graph",
                                    "description": "Render dynamic graphs based on d3 models with Neo4j data format.",
                                    "url": "https://github.com/jcarva/react-graph",
                                    "mood": "https://youtu.be/dQw4w9WgXcQ"
                                }
                            }
                        ],
                        "relationships": [
                            {
                                "id": "7",
                                "type": "DEVELOPES",
                                "startNode": "1",
                                "endNode": "8",
                                "properties": {
                                    "from": 1470002400000
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "errors": []
}

Credits

Inspired and helped this awesome project.

Projects

People

License

GPLv3 🄯 jcarva

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.2

4 years ago

0.0.0

4 years ago