diff --git a/chart.module b/chart.module
index 76e177b..0da3bf8 100644
--- a/chart.module
+++ b/chart.module
@@ -11,7 +11,13 @@
 /*
  * Misc
  */
-define('CHART_URI', 'http://chart.googleapis.com/chart');
+global $is_https; // This global is set by bootstrap.inc
+if ($is_https) {
+  define('CHART_URI', 'https://chart.googleapis.com/chart');
+}
+else {
+  define('CHART_URI', 'http://chart.googleapis.com/chart');
+}
 
 /*
  * Chart types.
