From b501b7123cd6d598d3f9b179f0fc096271383c69 Mon Sep 17 00:00:00 2001 From: User Date: Thu, 8 Nov 2012 12:31:05 -0500 Subject: [PATCH] Added ability to extend graph options with state parameter 'graphOptions' --- src/view.graph.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/view.graph.js b/src/view.graph.js index bcde3e57..8ad75391 100644 --- a/src/view.graph.js +++ b/src/view.graph.js @@ -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() {