Share your repls and programming experiences

← Back to all posts
SortaGrapher - easy <canvas> graphs
tussiez (1507)


This is a short Repl I wrote in a night or so :D

SortaGrapher makes it easy to add graphs to your project.

Quick Setup

Find the entire user guide here:

First, import the module:

import Grapher from ''

Then, create a new graph:

let myGraph = new Grapher(75,75); // width/height in pixels

// add the canvas!

Make a data logger:

let logger = new myGraph.Reader(20); // max. data points to show

And finally, graph stuff:

// Only accepts values from 0-1.
// You may need to use .the optional scaling function:
// logger.mapNumber(myValue,minimum,maximum);


Tip: This uses SortaCanvas, so if you want to draw objects, such as text, along with the graph, use myGraph.sortacanvas.


Here it is!

ch1ck3n (1604)

descrives my heartbeat just perfectly

tussiez (1507)

@ch1ck3n What were you- anyway:
1 2 3
4 5 6
7 8 9

tussiez (1507)


"911, what's your emergency?"

ch1ck3n (1604)

@tussiez scared monkey noises and even faster heartbeat