Web app to graph number list from a json file.
You can try this app here
You need to provide a json file following this example:
{
"x": [1, 2, 3],
"y": [1, 4, 9]
}
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
.
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.
- You can open a issue to ask new funcionalities or report bugs here.
- You can clone this repository and do a pull request here.
MIT license: Copyright (c) 2023 Luis Rojas