Fix show_x_values_as_labels when the label is a String

This commit is contained in:
Jorge 2021-05-04 03:28:19 +02:00
parent eb0006c17a
commit bbfe1c4783

View File

@ -500,9 +500,9 @@ func calculate_tics():
for i in y_chors.size(): for i in y_chors.size():
y_chors[i] = String(y_chors[i]) #Can't cast directly on calculate_interval_tics because it mess up with the sorting y_chors[i] = String(y_chors[i]) #Can't cast directly on calculate_interval_tics because it mess up with the sorting
x_margin_min = x_range[0]
var x_margin_max = x_range[1]
if not show_x_values_as_labels: if not show_x_values_as_labels:
x_margin_min = x_range[0]
var x_margin_max = x_range[1]
h_dist = x_decim * pow(10.0, calculate_position_significant_figure(x_margin_max - x_margin_min) - 1) h_dist = x_decim * pow(10.0, calculate_position_significant_figure(x_margin_max - x_margin_min) - 1)
if x_margin_min < 0 and x_margin_max >= 0: if x_margin_min < 0 and x_margin_max >= 0: