diff --git a/src/view.graph.js b/src/view.graph.js index 8ad75391..d0371d69 100644 --- a/src/view.graph.js +++ b/src/view.graph.js @@ -15,9 +15,10 @@ this.recline.View = this.recline.View || {}; // { // group: {column name for x-axis}, // series: [{column name for series A}, {column name series B}, ... ], -// graphType: 'line' +// graphType: 'line', +// graphOptions: {custom [Flotr2 options](http://www.humblesoftware.com/flotr2/documentation#configuration)} // } -// +// // NB: should *not* provide an el argument to the view but must let the view // generate the element itself (you can then append view.el to the DOM. my.Graph = Backbone.View.extend({ @@ -248,9 +249,9 @@ my.Graph = Backbone.View.extend({ grid: { hoverable: true, clickable: true } }; - if ("graphOptions" in self.state.attributes){ + if (self.state.get('graphOptions')){ return _.extend(optionsPerGraphType[typeId], - self.state.attributes.graphOptions + self.state.get('graphOptions') ) }else{ return optionsPerGraphType[typeId];