Unbreaks dygraph charts. Heh.
authorDavid Schoonover <dsc@wikimedia.org>
Wed, 20 Jun 2012 16:05:38 +0000 (09:05 -0700)
committerDavid Schoonover <dsc@wikimedia.org>
Wed, 20 Jun 2012 16:05:38 +0000 (09:05 -0700)
lib/graph/graph-model.co
lib/main-geo.co

index 96e679f..e72ca89 100644 (file)
@@ -88,7 +88,6 @@ Graph = exports.Graph = BaseModel.extend do # {{{
         attributes.options or= {}
         attributes.slug    or= attributes.id if attributes.id?
         @optionCascade = new Cascade attributes.options
-        @on 'change:chartType', ~> @chartType = ChartType.create this
         BaseModel.call this, attributes, opts
     
     
@@ -97,6 +96,8 @@ Graph = exports.Graph = BaseModel.extend do # {{{
         
         @constructor.register this
         @parents = new GraphList
+        @chartType = ChartType.create this
+        @on 'change:chartType', ~> @chartType = ChartType.create this
         
         # Insert submodels in place of JSON
         @dataset = new DataSet {id:@id, ...@get 'data'}
index 4369a2a..2faa384 100644 (file)
@@ -1,5 +1,5 @@
-# Seq      = require 'seq'
-# d3          = require 'd3'
+Seq         = require 'seq'
+d3          = require 'd3'
 ColorBrewer = require 'colorbrewer'