diff --git a/libraries/d3.barchart/barchart.js b/libraries/d3.barchart/barchart.js
index 1d28be6..9559dd5 100755
--- a/libraries/d3.barchart/barchart.js
+++ b/libraries/d3.barchart/barchart.js
@@ -3,7 +3,7 @@
  * Adds a function to generate a column chart to the `Drupal` object.
  */
 
-/** 
+/**
  * Notes on data formatting:
  * legend: array of text values. Length is number of data types.
  * rows: array of arrays. One array for each point of data
@@ -25,8 +25,8 @@
       max = d3.max(d3.merge(settings.rows).map(function(d) { return + d; })),
       // Padding is top, right, bottom, left as in css padding.
       p = [10, 50, 30, 50],
-      w = 800,
-      h = 400,
+      w = settings.width,
+      h = settings.height,
       // chart is 65% and 80% of overall height
       chart = {w: w * .65, h: h * .80},
       legend = {w: w * .35, h:h},
