Added ability to extend graph options with state parameter 'graphOptions'

This commit is contained in:
User 2012-11-08 12:31:05 -05:00
parent d479603ca7
commit b501b7123c

View File

@ -247,7 +247,14 @@ my.Graph = Backbone.View.extend({
},
grid: { hoverable: true, clickable: true }
};
return optionsPerGraphType[typeId];
if ("graphOptions" in self.state.attributes){
return _.extend(optionsPerGraphType[typeId],
self.state.attributes.graphOptions
)
}else{
return optionsPerGraphType[typeId];
}
},
createSeries: function() {