g.canvas element that holds the area where the graphs are plotted (clipped with a mask)
Element that holds the canvas where the functions are drawn
Draggable element that receives zoom and pan events
Private generationThe number of times a function was rendered.
Private Readonly idPrivate linePrivate linkedArray of function-plot instances linked to the events of this instance, i.e. when the zoom event is dispatched on this instance it's also dispatched on all the instances of this array
Readonly markersvg element that holds the graph (canvas + title + axes)
Element that holds the tip
Static cachePrivate buildPrivate getPrivate getGenerated using TypeDoc
An instance can subscribe to any of the following events by doing
instance.on([eventName], callback), events can be triggered by doinginstance.emit([eventName][, params])mouseoverfired whenever the mouse is over the canvasmousemovefired whenever the mouse is moved inside the canvas, callback params: a single object{x: number, y: number}(in canvas space coordinates)mouseoutfired whenever the mouse is moved outside the canvasbefore:drawfired before drawing all the graphsafter:drawfired after drawing all the graphszoomfired whenever there's scaling/translation on the graph (x-scale and y-scale of another graph whose scales were updated)tip:updatefired whenever the tip position is updated, callback params{x, y, index}(in canvas space coordinates,indexis the index of the graph where the tip is on top of)evalfired whenever the sampler evaluates a function, callback paramsdata(an array of segment/points),index(the index of datum in thedataarray),isHelper(true if the data is created for a helper e.g. for the derivative/secant)The following events are dispatched to all the linked graphs
all:mouseoversame asmouseoverbut it's dispatched in each linked graphall:mousemovesame asmousemovebut it's dispatched in each linked graphall:mouseoutsame asmouseoutbut it's dispatched in each linked graphall:zoomfired whenever there's scaling/translation on the graph, dispatched on all the linked graphs