Consider a refactor of code for formatting numeric values into a helper function (rounding), and add unit tests
Here are 5 places where we round the value of a score. Could we just do it once?
|
text_value = text_value.toFixed(get_round_decimals(col_name)); |
|
hovertemplate: `model: %{data.name}<br>${thisState.selected_disaggregate_by}: %{x}<br>${score_col_name_to_text(this.state.selected_metric)}: %{y:.${get_round_decimals(this.state.selected_metric)}f}<extra></extra>`, |
|
colorbar_tick_format = `.${get_round_decimals(this.state.selected_metric)}f`; |
|
colorbar_tick_format = `.${get_round_decimals(this.state.selected_metric)}f`; |
|
hovertemplate: `${thisState.selected_disaggregate_by}: %{x}<br>model: %{y}<br>${score_col_name_to_text(this.state.selected_metric)}: %{customdata:.${get_round_decimals(this.state.selected_metric)}f}<extra></extra>`, |
this is probably very low priority
Consider a refactor of code for formatting numeric values into a helper function (rounding), and add unit tests
Here are 5 places where we round the value of a score. Could we just do it once?
predevals/src/predevals.js
Line 581 in f268127
predevals/src/predevals.js
Line 745 in f268127
predevals/src/predevals.js
Line 782 in f268127
predevals/src/predevals.js
Line 820 in f268127
predevals/src/predevals.js
Line 911 in f268127
this is probably very low priority