mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
DS-5920 fixed incorrect dash in histogram tooltips for Windows case
Merge-request: IJ-MR-118912 Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com> GitOrigin-RevId: 5e07344b21850196e10570e4ab114ea957e364e2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8fa81e9a27
commit
263f637545
@@ -194,7 +194,8 @@ def analyze_numeric_column(column):
|
||||
else:
|
||||
format_function = lambda x: round(x, 1)
|
||||
|
||||
bin_labels = ['{} — {}'.format(format_function(bin_edges[i]), format_function(bin_edges[i+1])) for i in range(ColumnVisualisationUtils.NUM_BINS)]
|
||||
# so {} — {} will be correctly viewed both on Mac and Windows
|
||||
bin_labels = ['{} \u2014 {}'.format(format_function(bin_edges[i]), format_function(bin_edges[i+1])) for i in range(ColumnVisualisationUtils.NUM_BINS)]
|
||||
bin_count_dict = {label: count for label, count in zip(bin_labels, counts)}
|
||||
res = bin_count_dict
|
||||
return add_custom_key_value_separator(res.items())
|
||||
|
||||
@@ -159,7 +159,9 @@ def analyze_numeric_column(column, col_name):
|
||||
if unique_values > ColumnVisualisationUtils.NUM_BINS:
|
||||
counts, bin_edges = np.histogram(column, bins=ColumnVisualisationUtils.NUM_BINS)
|
||||
format_function = int if column.is_integer() else lambda x: round(x, 1)
|
||||
bin_labels = ['{} — {}'.format(format_function(bin_edges[i]), format_function(bin_edges[i + 1])) for i in range(ColumnVisualisationUtils.NUM_BINS)]
|
||||
|
||||
# so {} — {} will be correctly viewed both on Mac and Windows
|
||||
bin_labels = ['{} \u2014 {}'.format(format_function(bin_edges[i]), format_function(bin_edges[i + 1])) for i in range(ColumnVisualisationUtils.NUM_BINS)]
|
||||
res = add_custom_key_value_separator(zip(bin_labels, counts))
|
||||
else:
|
||||
counts = column.value_counts().sort(by=col_name).to_dict()
|
||||
|
||||
Reference in New Issue
Block a user