X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=09a668453608de16a6a82c6f14f29176621b2685;hb=eca085ecfb71db2647c00a9f4e528128878d8372;hp=2ba42c90e9b6641fbd04ce9d327074b7fcb55c23;hpb=79420a1ea6ab965657553c055858398ecf4b7699;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 2ba42c9..09a6684 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1184,3 +1184,17 @@ DateGraph.prototype.adjustRoll = function(length) { this.rollPeriod_ = length; this.drawGraph_(this.rawData_); }; + + +/** + * A wrapper around DateGraph that implements the gviz API. + * @param {Object} container The DOM object the visualization should live in. + */ +DateGraph.GVizChart = function(container) { + this.container = container; +} + +DateGraph.GVizChart.prototype.draw = function(data, options) { + this.container.innerHTML = ''; + this.date_graph = new DateGraph(this.container, data, null, options || {}); +}