diff --git a/client/src/scripts/scoring-sheet-view.coffee b/client/src/scripts/scoring-sheet-view.coffee index 199f8810b7..419ae0c3ab 100644 --- a/client/src/scripts/scoring-sheet-view.coffee +++ b/client/src/scripts/scoring-sheet-view.coffee @@ -580,15 +580,19 @@ Steam.ScoringSheetView = (_, _scorings) -> _metricTypeFilter = null _metricCriteriaFilter = null _allFilters = null + + getSortedFloatVariables = (variables) -> + sortBy (filter variables, (variable) -> variable.type is 'float'), (variable) -> variable.caption + _metricsVisualizationType = type: 'scoring' caption: 'Scoring' - variables: filter metricVariables, (variable) -> variable.type is 'float' + variables: getSortedFloatVariables metricVariables _thresholdVisualizationType = type: 'threshold' caption: 'Threshold' - variables: filter thresholdVariables, (variable) -> variable.type is 'float' + variables: getSortedFloatVariables thresholdVariables _visualizationTypes = [ _metricsVisualizationType, _thresholdVisualizationType ]