A library for plotting math functions on <canvas> (HTML element).
It's easy as pie. Firstly you need the files:
Then
<!DOCTYPE html><html><head><metacharset="utf-8"><scriptsrc="plotter.js"></script><script>window.onload=function(){varplotter=newPlotter('graph');plotter.addFunction('x',{lineColor: 'red'});plotter.addFunction('x * x',{lineColor: 'blue'});};</script></head><body><canvasid="graph" width="500" height="380"></canvas></body></html>For more details see examples folder.
Clone this repo
git clone https://github.com/ja0n/plotter.js.gitInstall dev dependencies
npm installRun dev server
npm run serveAnd open http://localhost:8090/
Or build files
npm run build