Library: Geometries
Overview
Geometries
  • desc: Geometries
Constructors
Timeplot.DefaultValueGeometry(params)
This is the constructor for the default value geometry. A value geometry is what regulates mapping of the plot values to the screen y coordinate. If two plots share the same value geometry, they will be drawn using the same scale. If "min" and "max" parameters are not set, the geometry will stretch itself automatically so that the entire plot will be drawn without overflowing. The stretching happens also when a geometry is shared between multiple plots, the one with the biggest range will win over the others.
parameters
params
methods
Timeplot.LogarithmicValueGeometry(params)
This is the constructor for a Logarithmic value geometry, which is useful when plots have values in different magnitudes but exhibit similar trends and such trends want to be shown on the same plot (here a cartesian geometry would make the small magnitudes disappear). NOTE: this class extends Timeplot.DefaultValueGeometry and inherits all of the methods of that class. So refer to that class.
parameters
params
methods
Timeplot.DefaultTimeGeometry(params)
This is the constructor for the default time geometry.
parameters
params
methods
Timeplot.MagnifyingTimeGeometry(params)
This is the constructor for the magnifying time geometry. Users can interact with this geometry and 'magnify' certain areas of the plot to see the plot enlarged and resolve details that would otherwise get lost or cluttered with a linear time geometry.
parameters
params
methods
Functions
Timeplot.DefaultValueGeometry.setTimeplot(timeplot)
Since geometries can be reused across timeplots, we need to call this function before we can paint using this geometry.
parameters
timeplot
Called by all the plot layers this geometry is associated with to update the value range. Unless min/max values are specified in the parameters, the biggest value range will be used.
parameters
range
Called after changing ranges or canvas size to reset the grid values
Map the given value to a y screen coordinate.
parameters
value
Map the given y screen coordinate to a value
parameters
y
Each geometry is also a painter and paints the value grid and grid labels.
Removes all the labels that were added by this geometry
Turn the logarithmic scaling off.
Turn the logarithmic scaling on.
Toggle logarithmic scaling seeting it to on if off and viceversa.
Timeplot.DefaultTimeGeometry.setTimeplot(timeplot)
Since geometries can be reused across timeplots, we need to call this function before we can paint using this geometry.
parameters
timeplot
Called by all the plot layers this geometry is associated with to update the time range. Unless min/max values are specified in the parameters, the biggest range will be used.
parameters
range
Called after changing ranges or canvas size to reset the grid values
Map the given date to a x screen coordinate.
parameters
time
Map the given x screen coordinate to a date.
parameters
x
Get a period (in milliseconds) this time geometry spans.
Return the labeler that has been associated with this time geometry
Return the time unit associated with this time geometry
Each geometry is also a painter and paints the value grid and grid labels.
Timeplot.MagnifyingTimeGeometry.initialize(timeplot)
Initialize this geometry associating it with the given timeplot and register the geometry event handlers to the timeplot so that it can interact with the user.
parameters
timeplot
Timeplot.MagnifyingTimeGeometry.setMagnifyingParams(c, a, b)
Set the Magnifying parameters. c is the location in pixels where the Magnifying center should be located in the timeplot, a is the aperture in pixel of the Magnifying and b is the time period in milliseconds that the Magnifying should span.
parameters
c
a
b
Objects
Generated by JsDoc Toolkit on Fri, 27 Jul 2007 04:11:47 GMT