Class DygraphLayout
Defined in: dygraph-layout.js.
Constructor Attributes | Constructor Name and Description |
---|---|
DygraphLayout(dygraph)
Creates a new DygraphLayout object.
|
Field Attributes | Field Name and Description |
---|---|
Array of points for each series.
|
Method Attributes | Method Name and Description |
---|---|
addDataset(setname, set_xy)
Add points for a single series.
|
|
<static> |
DygraphLayout.calcYNormal_(axis, value, logscale)
|
Returns the box which the chart should be drawn in.
|
|
Convenience function to remove all the data sets from a graph
|
Class Detail
DygraphLayout(dygraph)
Creates a new DygraphLayout object.
This class contains all the data to be charted.
It uses data coordinates, but also records the chart range (in data
coordinates) and hence is able to calculate percentage positions ('In this
view, Point A lies 25% down the x-axis.')
Two things that it does not do are:
1. Record pixel coordinates for anything.
2. (oddly) determine anything about the layout of chart elements.
The naming is a vestige of Dygraph's original PlotKit roots.
- Parameters:
- dygraph
Field Detail
points
Array of points for each series.
[series index][row index in series] = |Point| structure,
where series index refers to visible series only, and the
point index is for the reduced set of points for the current
zoom region (including one point just outside the window).
All points in the same row index share the same X value.
Method Detail
addDataset(setname, set_xy)
Add points for a single series.
- Parameters:
- {string} setname
- Name of the series.
-
{Array.
} set_xy - Points for the series.
<static>
{number}
DygraphLayout.calcYNormal_(axis, value, logscale)
- Parameters:
- {DygraphAxisType} axis
- {number} value
- {boolean} logscale
- Returns:
- {number}
{{x: number|y: number|w: number|h: number}}
getPlotArea()
Returns the box which the chart should be drawn in. This is the canvas's
box, less space needed for the axis and chart labels.
- Returns:
- {{x: number|y: number|w: number|h: number}}
removeAllDatasets()
Convenience function to remove all the data sets from a graph