graph2d.js

1.0.1 • Public • Published

Graph2D.js

React Library for interactive navigation of graphs of 2d functions.

Install

npm install -f graph2d.js

Example Usage

import React, { Component } from 'react'
import {Graph2D} from 'graph2d.js'

function App() {
  return (
    <div className="App">
        <Graph2D width={400} height={400} 

        htmlStyle={{"border": "1px solid red"}} // for html
        canvasStyle={{
          function: {shadowBlur: 10, shadowColor: "red"}
        }} // for getContext("2d")
        functions={[ 
          [x => 0.5 * x * x, "red"],
          [x => x - 2, "white"]
        ]}
          />
    </div>
  )
}

export default App;

License

MIT © Greece4ever

/graph2d.js/

    Package Sidebar

    Install

    npm i graph2d.js

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    109 kB

    Total Files

    7

    Last publish

    Collaborators

    • greece4ever