widget.measure_filter_histogram.property.maxItems.name=Maximum number of components to show
widget.measure_filter_histogram.property.reverseOrder.name=Reverse sort order of filter
widget.measure_filter_histogram.property.displayWorstBestValues.name=Display scale with worst and best values when appropriate
-widget.measure_filter_histogram.max_items_reached=Max items are reached.
+widget.measure_filter_histogram.max_items_reached=Only the {0} first components are displayed
widget.measure_filter_bubble_chart.name=Measure Filter as Bubble Chart
widget.measure_filter_bubble_chart.description=Displays the result of a pre-configured measure filter as a bubble chart.
<!--[if (gte IE 9)|!(IE)]><!-->
<% if chartTitle %>
<h3 style="text-align: center;"><%= h(chartTitle) -%></h3>
+ <% else %>
+ <h3 style="text-align: center;"><%= h widget_properties["metric"].short_name -%></h3>
<% end %>
<!--<![endif]-->
</div>
.metricsPriority(metrics)
.options({
baseUrl: baseUrl + '/dashboard/index/',
- maxItems: <%= maxItems -%>,
- maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached") -%>'
+ displayWorstBestValues: <%= displayWorstBestValues -%>,
+ maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>'
})
.render('#<%= containerId -%>');
// Show maxResultsReached message
- this.maxResultsReached(this.options().maxItems === this.components().length);
if (this.maxResultsReached()) {
this.maxResultsReachedLabel = this.gWrap.append('text')
.classed('max-results-reached', true)
// Update scales
- var xDomain = d3.extent(this.components(), function(d) {
- return widget.getMainMetric(d);
- });
+ var xDomain;
+ if (this.options().displayWorstBestValues) {
+ var metric = this.metrics()[this.mainMetric];
+ xDomain = [metric.worstValue, metric.bestValue];
+ } else {
+ xDomain = d3.extent(this.components(), function(d) {
+ return widget.getMainMetric(d);
+ });
+ }
this.x
.domain(xDomain)
.range([this.availableWidth / 8, this.availableWidth]);
// Show maxResultsReached message
if (this.maxResultsReached()) {
this.maxResultsReachedLabel
- .attr('transform', trans(this.legendWidth(), this.height() - this.margin().bottom));
+ .attr('transform', trans(this.legendWidth(), this.height() - this.margin().bottom - 3));
}
};
.metricsPriority(that.metricsPriority())
.components(response.components)
.options(that.options());
+ if (typeof that.widget.maxResultsReached === 'function') {
+ that.widget.maxResultsReached(response.paging.pages > 1);
+ }
if (that.height()) {
that.widget.height(that.height());
}