luisrojass / function-grapher

Web app to graph number list from a json file.

Home Page:https://function-grapher.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web app to graph number list from a json file.

Quick start

You can try this app here

You need to provide a json file following this example:

  {
    "x": [1, 2, 3],
    "y": [1, 4, 9]
  }

Installation

First, import this project with git clone:

$ git clone https://github.com/luisrojass/function-grapher.git

Or, if you prefer, download the zip file and unzip it.

Go to client directory:

$ cd client

Here, in /js/renderer.js contains the FunctionRenderer class that you can import to another file, don't forget that this file needs /js/math.js.

Features

FunctionRenderer class provides customizations for config:

  • showAxies
  • showLines
  • showFlags
  • showValues
  • showBackgroundRects
  • roundLimitsOnYAxis
  • AxisDivisionsY

And for styles:

  • backgroundColor
  • backgroundRectsColor
  • font
  • lineColor
  • lineWidth
  • fillColor

You can graph more than one function in the same canvas, calling FunctionRenderer.render() with other lists setting other config and styles for every graph.

Contributing

  • You can open a issue to ask new funcionalities or report bugs here.
  • You can clone this repository and do a pull request here.

License

MIT license: Copyright (c) 2023 Luis Rojas

MIT License

About

Web app to graph number list from a json file.

https://function-grapher.netlify.app/

License:MIT License


Languages

Language:JavaScript 88.8%Language:HTML 6.0%Language:CSS 5.1%