* - http://dygraphs.com/tests/annotation-gviz.html
*/
-(function() {
/*global Dygraph:false */
"use strict";
+import Dygraph from './dygraph';
+
/**
* A wrapper around Dygraph that implements the gviz API.
* @param {!HTMLDivElement} container The DOM object the visualization should
* live in.
* @constructor
*/
-Dygraph.GVizChart = function(container) {
+var GVizChart = function(container) {
this.container = container;
};
* @param {GVizDataTable} data
* @param {Object.<*>} options
*/
-Dygraph.GVizChart.prototype.draw = function(data, options) {
+GVizChart.prototype.draw = function(data, options) {
// Clear out any existing dygraph.
// TODO(danvk): would it make more sense to simply redraw using the current
// date_graph object?
* @param {Array.<{row:number}>} selection_array array of the selected cells
* @public
*/
-Dygraph.GVizChart.prototype.setSelection = function(selection_array) {
+GVizChart.prototype.setSelection = function(selection_array) {
var row = false;
if (selection_array.length) {
row = selection_array[0].row;
* @return {Array.<{row:number,column:number}>} array of the selected cells
* @public
*/
-Dygraph.GVizChart.prototype.getSelection = function() {
+GVizChart.prototype.getSelection = function() {
var selection = [];
var row = this.date_graph.getSelection();
return selection;
};
-})();
+export default GVizChart;