function ScatterplotFacet(div, config, options) { this._div = div; this._config = config; this._options = options; this._from_x = ("from_x" in this._config) ? this._config.from_x : null; this._to_x = ("to_x" in this._config) ? this._config.to_x : null; this._from_y = ("from_y" in this._config) ? this._config.from_y : null; this._to_y = ("to_y" in this._config) ? this._config.to_y : null; this._error = false; this._initializedUI = false; } ScatterplotFacet.prototype.reset = function() { // TODO }; ScatterplotFacet.reconstruct = function(div, uiState) { return new ScatterplotFacet(div, uiState.c, uiState.o); }; ScatterplotFacet.prototype.getUIState = function() { var json = { c: this.getJSON(), o: this._options }; return json; }; ScatterplotFacet.prototype.getJSON = function() { var o = { type: "scatterplot", name: this._config.name, x_columnName : this._config.x_columnName, y_columnName : this._config.y_columnName, x_expression: this._config.x_expression, y_expression: this._config.y_expression, }; return o; }; ScatterplotFacet.prototype.hasSelection = function() { // TODO }; ScatterplotFacet.prototype._initializeUI = function() { var self = this; var container = this._div.empty(); var headerDiv = $('
').addClass("facet-title").appendTo(container); $('').text(this._config.name).appendTo(headerDiv); var resetButton = $('').addClass("facet-choice-link").text("reset").click(function() { self.reset(); self._updateRest(); }).prependTo(headerDiv); var removeButton = $('