* is2DPan: boolean,
* cancelNextDblclick: boolean,
* initializeMouseDown:
- * function(!Event, !Dygraph, !Dygraph.InteractionContext)
+ * function(!Event, !Dygraph, !DygraphInteractionContext)
* }}
*/
-var DygraphsInteractionContext;
+var DygraphInteractionContext;
};
/**
- * @param {GVizDataTable} data
- * @param {Object.<*>} options
+ * @param {google.visualization.DataTable} data
+ * @param {Object} options
*/
Dygraph.GVizChart.prototype.draw = function(data, options) {
// Clear out any existing dygraph.
* @param {!DygraphInteractionContext} context
*/
Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) {
- var clickCallback = g.attr_('clickCallback');
- var pointClickCallback = g.attr_('pointClickCallback');
+ var clickCallback = /**@type{Function}*/(g.attr_('clickCallback'));
+ var pointClickCallback = /**@type{Function}*/(g.attr_('pointClickCallback'));
var selectedPoint = null;
/** @type {Array.<string>} */
this.setNames = [];
- /** @type {Array.<!Dygraph.AnnotationType>} */
+ /** @type {Array.<!DygraphAnnotationType>} */
this.annotations = [];
/** @type {Array.<DygraphAxisType>} */
// TODO(danvk): it's odd that xTicks_ and yTicks_ are inputs, but xticks and
// yticks are outputs. Clean this up.
- /** @type {Dygraph.TickList} */
+ /** @type {DygraphTickList} */
this.xTicks_ = null;
- /** @type {Dygraph.TickList} */
+ /** @type {DygraphTickList} */
this.yTicks_ = null;
/** @type {?DygraphRect} */
};
/**
- * @param {Array.<!Dygraph.AnnotationType>} ann The annotations
+ * @param {Array.<!DygraphAnnotationType>} ann The annotations
*/
DygraphLayout.prototype.setAnnotations = function(ann) {
// The Dygraph object's annotations aren't parsed. We parse them here and
// save a copy. If there is no parser, then the user must be using raw format.
- /** @type {Array.<!Dygraph.AnnotationType>} */
+ /** @type {Array.<!DygraphAnnotationType>} */
this.annotations = [];
var parse = /** @type {function(string):number} */(this.attr_('xValueParser')) || function(x) { return parseFloat(x); };
for (var i = 0; i < ann.length; i++) {
// lame that closure compiler wants all these undefineds!
- /** @type {Dygraph.AnnotationType} */
+ /** @type {DygraphAnnotationType} */
var a = {
x: ann[i].x,
series: ann[i].series,
};
/**
- * @param {!Dygraph.TickList} xTicks The x-axis ticks.
+ * @param {!DygraphTickList} xTicks The x-axis ticks.
*/
DygraphLayout.prototype.setXTicks = function(xTicks) {
this.xTicks_ = xTicks;
} else {
for (var idx = 0; idx < this.labels_.length; idx++) {
var seriesName = this.labels_[idx];
- var optionsForSeries = this.user_.series[seriesName] || {};
+ var optionsForSeries = this.user_['series'][seriesName] || {};
var yAxis = axisToIndex_(optionsForSeries["axis"]);
this.series_[seriesName] = {
* Converts page the x-coordinate of the event to pixel x-coordinates on the
* canvas (i.e. DOM Coords).
* @param {!Event} e Drag event.
- * @param {!Dygraph.InteractionContext} context Interaction context object.
+ * @param {!DygraphInteractionContext} context Interaction context object.
* @return {number} The amount by which the drag has moved to the right.
*/
Dygraph.dragGetX_ = function(e, context) {
* Converts page the y-coordinate of the event to pixel y-coordinates on the
* canvas (i.e. DOM Coords).
* @param {!Event} e Drag event.
- * @param {!Dygraph.InteractionContext} context Interaction context object.
+ * @param {!DygraphInteractionContext} context Interaction context object.
* @return {number} The amount by which the drag has moved down.
*/
Dygraph.dragGetY_ = function(e, context) {
typeof(G_vmlCanvasManager) != 'undefined' &&
document.readyState != 'complete') {
// TODO(danvk): fix this code given lack of __init__ method.
- var self = this;
- setTimeout(function() { self.__init__(div, file, attrs); }, 100);
+ // var self = this;
+ // setTimeout(function() { self.__init__(div, file, attrs); }, 100);
return;
}