2 filter_id = widget_properties['filter']
3 size_metric = widget_properties['sizeMetric']
4 color_metric = widget_properties['colorMetric']
5 filter = MeasureFilter.find_by_id(filter_id.to_i) if filter_id
7 filter.load_criteria_from_data
8 filter.set_criteria_value('display', 'treemap')
9 filter.set_criteria_value('tmSize', size_metric.key) if size_metric
10 filter.set_criteria_value('tmColor', color_metric.key) if color_metric
11 filter.execute(self, :user => current_user)
12 @widget_title = link_to h(filter.name), {:controller => 'measures', :action => 'filter', :id => filter.id, :display => 'treemap'}
14 <%= render :partial => "measures/display_#{filter.display.key}", :locals => {:edit_mode => false, :widget => widget, :filter => filter} %>