Manager: For Statistics graph show values on Y axis with 2 digits after point if these two digits are greater than 0.01 only

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2017-08-31 00:47:54 +03:00
parent 975c2d21bc
commit 55d688fb19
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 1 additions and 1 deletions

View File

@ -740,7 +740,7 @@ void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double m
d_oy_count = (int)floor((max_val_y - y_start_val) / d_oy_val);
double temp_int_part;
int prec = modf(d_oy_val, &temp_int_part) == 0.0 ? 0 : 2;
int prec = modf(d_oy_val, &temp_int_part) < 0.01 ? 0 : 2;
for (double ny = 0; ny <= double(d_oy_count); ++ny){
dc.GetTextExtent(wxString::Format(wxT("%s"), format_number(y_start_val + ny * d_oy_val, prec)), &w_temp, &h_temp, &des_temp, &lead_temp);