1.0.0 • Published 5 years ago

d3-vs-plots v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Installing

  1. npm install d3-vs-plots

  2. npm install d3

Example

Scatter Plot

const attributes = {
  dataset: [] //Array of dataset
  graph_attributes: {
    axis_color: "BLACK",
    point_color: "BLACK",
    point_shape: "circle",
    point_size: 2
  }
}
  import * as plots from 'd3-vs-plots';

  componentDidMount() {
    plots.ring_plot.create_ring_plot(attributes)
  }

  render() {
    return (
      <div className="App">
        <div id="graph"></div>
      </div>
    );
  }

Ring Plot

const attributes = {
  dataset: [] //Array of dataset
  graph_attributes: {
    axis_color:"BLACK",
    fill_color:"none",
    ring_thickness:1,
    stroke_color:"BLACK"
    }
}
  import * as plots from 'd3-vs-plots';

  componentDidMount() {
    plots.scatter_plot.create_scatter_plot(attributes)
  }

  render() {
    return (
      <div className="App">
        <div id="graph"></div>
      </div>
    );
  }