From c0520d19b63d2fe73a9de0d0be52f88fa4462dac Mon Sep 17 00:00:00 2001 From: Philip Walton Date: Wed, 22 Jun 2016 23:10:07 -0500 Subject: [PATCH] Fix #43 --- google-analytics-chart.html | 2 ++ google-analytics-dashboard.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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];