diff --git a/google-analytics-chart.html b/google-analytics-chart.html index 666a164..deec2c0 100644 --- a/google-analytics-chart.html +++ b/google-analytics-chart.html @@ -223,6 +223,8 @@ ready: function() { this._boundResponseHandler = this.handleResponse.bind(this); + + this.$.chart.options = this.$.chart.options || {}; merge(this.$.chart.options, getChartOptions(this.type), this.options); }, diff --git a/google-analytics-dashboard.html b/google-analytics-dashboard.html index 69a1bd2..efcc781 100644 --- a/google-analytics-dashboard.html +++ b/google-analytics-dashboard.html @@ -79,7 +79,7 @@ }, ready: function() { - this.updateChildren(); + this.updateChildren(); }, /** @@ -91,6 +91,10 @@ * @param {CustomEvent} event - The event with the query data. */ queryUpdated: function(event) { + if (!this.query) { + this.query = {}; + } + // Update `this.query` with the passed event data. Object.keys(event.detail).forEach(function(key) { this.query[key] = event.detail[key];