Skip to content
← Back to Community
SortaGrapher - easy <canvas> graphs
Profile icon
tussiez

SortaGrapher!

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: https://replit.com/@sortagames/SortaGrapher/readme.md

First, import the module:

import Grapher from 'https://sortagrapher.sortagames.repl.co/lib.js'

Then, create a new graph:

let myGraph = new Grapher(75,75); // width/height in pixels // add the canvas! document.body.appendChild(myGraph.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); logger.log(myValue);

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

Enjoy!

Here it is!

Voters
Profile icon
Unclyscam123
Profile icon
programmeruser
Profile icon
ch1ck3n
Profile icon
Th3Coder
Profile icon
Whippingdot
Profile icon
maxina
Profile icon
HarperframeInc
Profile icon
SelenaYang1
Profile icon
Brendan23
Profile icon
Baconman321
Comments
hotnewtop
Profile icon
Baconman321

cewl!

Profile icon
tussiez
Profile icon
maurofeliz
Profile icon
ch1ck3n

image

descrives my heartbeat just perfectly

Profile icon
tussiez

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

Profile icon
tussiez

@tussiez i'm calling

Profile icon
ch1ck3n
Profile icon
tussiez

@ch1ck3n

"911, what's your emergency?"
"come"

Profile icon
ch1ck3n

@tussiez scared monkey noises and even faster heartbeat

Profile icon
tussiez

@ch1ck3n monke noise

Profile icon
dObbOb11

@ch1ck3 no MY heartbeat:

black

Profile icon
ch1ck3n
Profile icon
tussiez

help

Profile icon
Whippingdot

Everyone's heartbeat
image

POG

Profile icon
tussiez
Profile icon
Brendan23

awesome!

Profile icon
tussiez