Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-d3-basic

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-d3-basic

react chart component

  • 0.0.8
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-d3-basics

A solution for building reusable components for d3 charts.

Install

npm install --save react-d3-core

Support Charts

  • Line Chart
  • Multipule Line Chart
  • Scatter Plot
  • Area Chart
  • Area Stack Chart
  • Bar Chart
  • Bar Group Chart
  • Bar Stack Chart
  • Pie Chart
  • Donut Chart

See examples in Gallery

Support Chart with Brush

  • Line Chart
  • Multipule Line Chart
  • Scatter Plot
  • Area Stack Chart

See examples in Gallery

Docs

Components

Chart shapes components

inherit

Inherit initial props, state, functions...

Charts

Building Charts.

Why?

Q1: Why building another reusable chart library?

Nowadays, we had many great libraries to build a reusable charts, such as nvd3, c3, highchart... etc. Those are really great! But what react-d3 aimed to build is not only a reusable chart library, but also building reusable chart components for further usages.

For instance, if we want to build a new chart on top of react-d3 it is super easy, just call <xaxis>, <yaxis> and pass proper props. and we will build your xaxis and yaxis for you! This concept of building chart components might be a much better solution of building a whole new reusable chart community.

Q2: What are some other common problems that building d3 charts?
  • Reusability : You have to build your chart over and over again. react-d3 is using react, ES6 technologies make you easily to import and export your components.

  • Difficult to track data flow : It is so easy to mess up with your data, because most of the time you are manipulating data.

  • Sync your data to the svgs : When you finally change your data to a specific format, it's also cause many problems when updating data to your svgs. Where should I update? Did it update? What data is now? react-d3 help you solve the problems.

  • Checking your input data : Inputting the wrong data, will break your chart easily without knowing the reason.

Q3: Why react?

There are many main reasons using react as a basic structure.

  • PropType Check : React build-in PropTypes for checking props. So now if you pass the wrong format your console will tell you to change to proper prop.

  • Props : React props make you know your data better. Because props are like Immutable data in react components. So you can track your data more easily.

  • State : State make d3 much more powerful. Because when state change react will re-render your component with the optimal speed. And also it can make you

  • Components : Components make it easy to reuse your charts again and again.

  • Rendering : By default react re-render your component when every props and states change, which make d3 more awesome. Because we can have less problem on making sure if the data is up-to-date or not.

License

Apache 2.0

FAQs

Package last updated on 28 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc