2 containerId = 'pie-chart-widget' + widget.id.to_s
3 chartTitle = widget_properties['chartTitle']
4 filterId = widget_properties['filter'].to_i
5 maxItems = widget_properties['maxItems'].to_i
6 reverseColor = widget_properties['reverseColor']
8 filter = MeasureFilter.find_by_id(filterId.to_i)
9 @widget_title = link_to h(filter.name), {:controller => 'measures', :action => 'filter', :id => filter.id, :display => 'list'}
12 <div class="histogram-widget" id="<%= containerId %>">
13 <!--[if lte IE 8 ]> <h3><%= message('widget.unsupported_browser_warning') -%></h3> <![endif]-->
15 <!--[if (gte IE 9)|!(IE)]><!-->
17 <h3><%= h(chartTitle) -%></h3>
22 <!--[if (gte IE 9)|!(IE)]><!-->
26 '<%= widget_properties['colorMetric'].name -%>',
27 '<%= widget_properties['sizeMetric'].name -%>'
30 'filter=<%= filterId -%>',
31 'metrics=' + metrics.join(','),
32 'fields=name,longName,qualifier',
33 'pageSize=<%= maxItems -%>',
35 'sort=metric:' + metrics[1],
38 widget = new SonarWidgets.Widget();
42 .source(baseUrl + '/measures/search_filter?' + query)
43 .metricsPriority(metrics)
45 reverseColor: <%= reverseColor -%>,
46 baseUrl: baseUrl + '/dashboard/index/',
47 noData: '<%= message('no_data') -%>'
49 .render('#<%= containerId -%>');
51 autoResize(500, function() {
52 widget.update('#<%= containerId -%>');