The Dendrogrammer Code Documentation

dendrogrammer  Dendrogrammer version 1.0.3

The Dendrogrammer > dendrogrammer > GraphAxes

Class GraphAxes

For defining, drawing, and redrawing the dendrogram axes

The constructor creates x and y axis graphic and axis label objects on the given Raphael canvas.

Constructor

GraphAxes ( canvasIn , originHtIn , isNormalGraph )
Parameters:
canvasIn <object> - the Canvas ( a Canvas object)
originHtIn <object> - the Ht at the origin (a number)
isNormalGraph <object> - indidates if axes are for normal or summary. Affects labelling whether or not the X axis is to have notches (boolean)

Methods

drawXAxis

graphic element drawXAxis ( paper , startPt , length , notchInterval )
Draws an horizontal axis with notches every so often according to parameters
Parameters:
paper <Raphael canvas>
startPt <point object> canvas point to start drawing
length <number> length to be drawn
notchInterval <number> interval at which to place notches
Returns: graphic element
the drawn X axis

drawXAxisSmooth

graphic element drawXAxisSmooth ( paper , startPt , length )
Draws a smooth horizontal axis with no notches except at start and end
Parameters:
paper <Raphael canvas>
startPt <Point>
length <number>
Returns: graphic element
the drawn X axis

remove

void remove ( )
Removes drawn elements of the axes.
Returns: void

style

boolean style ( axis , title )
Styles a given axis
Parameters:
axis <graphic object> the axis object to be styled
title <string> title text for the axis mouse-over
Returns: boolean
true. Return value not used.


The Dendrogrammer © 2011 D.Robb (See Readme for MIT licence). These pages were created with YUIDoc Copyright © 2011 Yahoo! Inc. All rights reserved.