Graphing Calculator that evals JavaScript
  • JavaScript 82.2%
  • CSS 9.1%
  • HTML 8.7%
Find a file
2025-09-03 21:00:35 +02:00
images Initial 2015-07-08 19:58:48 +02:00
calc.js fix root & intersect 2015-07-10 23:29:15 +02:00
graphy.css fix ace issue 2015-07-11 17:41:56 +02:00
graphy.js fix ace issue 2015-07-11 17:41:56 +02:00
index.html fix zoom 2021-07-07 11:09:28 +02:00
jquery.min.js Initial 2015-07-08 19:58:48 +02:00
jquery.splitter.js Initial 2015-07-08 19:58:48 +02:00
jsgcalc.js fix root & intersect 2015-07-10 23:29:15 +02:00
LICENSE Initial 2015-07-08 19:58:48 +02:00
README.md mirror 2025-09-03 21:00:35 +02:00

js-graphy Playground

{ repos & mirrors: github.com/laktak/js-graphy, codeberg.org/laktak/js-graphy }

This playground allows you to visualize, test, tweak and play with your mathematical JavaScript functions.

Open the live playground!

To add a graph simply call graph.add() with your function. The only argument is x with y expected as the return value.

graph.add(function(x) { return x*x; });

You can use normal JS code:

// add another graph
function easing(x) {
  return x + 0.3 * Math.sin(2 * Math.PI * x);
}
graph.add(easing);

Set colors:

graph.add(function(x) { return -Math.round(x*x); }, "#00ff00");

To include external libraries use // script="URL":

// script="https://cdnjs.cloudflare.com/ajax/libs/mathjs/1.7.0/math.min.js"
graph.add(function(x) { return math.cube(x); });

Gists

If you want to share your playground

  • create a gist with your code
  • and append your gist-id to the playground url:

https://laktak.github.io/js-graphy/#gist=f8944fa044d972456d35

Thanks

Graphs are based on the JavaScript Graphing Calculator by Richard Ye.

Editing made possible by the Ajax.org Cloud9 Editor.