Class Index | File Index

## Classes

- _global_
- Dygraph
- DygraphCanvasRenderer
- DygraphInteraction
- DygraphLayout
- DygraphOptions
- grid
- GVizChart
- GVizDataTable

## Methods

- annotations
- axes
- chart_labels
- distanceFromChart
- numDateTicks

## Fields

- AxisLabelFormatter
- DRAG_EDGE_MARGIN
- DygraphDataArray
- DygraphInteractionContext
- OPTIONS_REFERENCE
- PREFERRED_LOG_TICK_VALUES
- TICK_PLACEMENT
- Ticker
- TickList
- ValueFormatter

# Built-In Namespace _global_

Field Summary
Field Attributes | Field Name and Description
--- | ---
| AxisLabelFormatter
| DRAG_EDGE_MARGIN You can drag this many pixels past the edge of the chart and still have it be considered a zoom.
| DygraphDataArray
| DygraphInteractionContext
| OPTIONS_REFERENCE
| PREFERRED_LOG_TICK_VALUES This is a list of human-friendly values at which to show tick marks on a log scale.
| TICK_PLACEMENT The value of datefield will start at an even multiple of "step", i.e.
| Ticker
| TickList
| ValueFormatter

Method Summary
Method Attributes | Method Name and Description
--- | ---
| annotations() Current bits of jankiness: - Uses dygraph.layout_ to get the parsed annotations.
| axes() Draws the axes.
| chart_labels()
| distanceFromChart(event, g) Returns the number of pixels by which the event happens from the nearest edge of the chart.
{number} | numDateTicks(start_time, end_time, granularity) Compute the number of ticks on a date axis for a given granularity.

Field Detail
AxisLabelFormatter
Defined in: dygraph-internal.externs.js.

DRAG_EDGE_MARGIN
You can drag this many pixels past the edge of the chart and still have it be considered a zoom. This makes it easier to zoom to the exact edge of the chart, a fairly common operation.
Defined in: dygraph-interaction-model.js.

DygraphDataArray
Defined in: dygraph-internal.externs.js.

DygraphInteractionContext
Defined in: dygraph-types.js.

OPTIONS_REFERENCE
Defined in: dygraph-options-reference.js.

PREFERRED_LOG_TICK_VALUES
This is a list of human-friendly values at which to show tick marks on a log scale. It is k * 10^n, where k=1..9 and n=-39..+39, so: ..., 1, 2, 3, 4, 5, ..., 9, 10, 20, 30, ..., 90, 100, 200, 300, ... NOTE: this assumes that utils.LOG_SCALE = 10.
Defined in: dygraph-tickers.js.

TICK_PLACEMENT
The value of datefield will start at an even multiple of "step", i.e. if datefield=SS and step=5 then the first tick will be on a multiple of 5s. For granularities <= HOURLY, ticks are generated every `spacing` ms. At coarser granularities, ticks are generated by incrementing `datefield` by `step`. In this case, the `spacing` value is only used to estimate the number of ticks. It should roughly correspond to the spacing between adjacent ticks.
Defined in: dygraph-tickers.js.

Ticker
Defined in: dygraph-tickers.js.

TickList
Defined in: dygraph-tickers.js.

ValueFormatter
Defined in: dygraph-internal.externs.js.
Method Detail
annotations()
Current bits of jankiness: - Uses dygraph.layout_ to get the parsed annotations. - Uses dygraph.plotter_.area It would be nice if the plugin didn't require so much special support inside the core dygraphs classes, but annotations involve quite a bit of parsing and layout. TODO(danvk): cache DOM elements.
Defined in: annotations.js.

axes()
Draws the axes. This includes the labels on the x- and y-axes, as well as the tick marks on the axes. It does _not_ draw the grid lines which span the entire chart.
Defined in: axes.js.

chart_labels()
Defined in: chart-labels.js.

distanceFromChart(event, g)
Returns the number of pixels by which the event happens from the nearest edge of the chart. For events in the interior of the chart, this returns zero.
Defined in: dygraph-interaction-model.js.

Parameters:
event
g

{number} numDateTicks(start_time, end_time, granularity)
Compute the number of ticks on a date axis for a given granularity.
Defined in: dygraph-tickers.js.

Parameters:
{number} start_time
{number} end_time
{number} granularity
  (one of the granularities enumerated above)

Returns:
  {number} (Approximate) number of ticks that would result.

Documentation generated by JsDoc Toolkit 2.4.0 for dygraph 2.2.2 (Debian 2.2.2-1)