Added a line to document graphOptions, changed attribute access method

This commit is contained in:
User
2012-11-08 13:02:49 -05:00
parent b501b7123c
commit c74c329c21

View File

@@ -15,7 +15,8 @@ this.recline.View = this.recline.View || {};
// { // {
// group: {column name for x-axis}, // group: {column name for x-axis},
// series: [{column name for series A}, {column name series B}, ... ], // 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 // NB: should *not* provide an el argument to the view but must let the view
@@ -248,9 +249,9 @@ my.Graph = Backbone.View.extend({
grid: { hoverable: true, clickable: true } grid: { hoverable: true, clickable: true }
}; };
if ("graphOptions" in self.state.attributes){ if (self.state.get('graphOptions')){
return _.extend(optionsPerGraphType[typeId], return _.extend(optionsPerGraphType[typeId],
self.state.attributes.graphOptions self.state.get('graphOptions')
) )
}else{ }else{
return optionsPerGraphType[typeId]; return optionsPerGraphType[typeId];