Commits
George Moellenbrock authored a34e585b8fc Merge
160 160 | timePrecision = getTickPrecision(); |
161 161 | if (timePrecision > 4) timePrecision = 4; |
162 162 | } |
163 163 | return QString(Plotter::formattedDateString( |
164 164 | m_referenceSet ? m_relativeDateFormat : m_dateFormat, value, |
165 165 | m_scale, m_referenceSet, timePrecision).c_str()); |
166 166 | } else { |
167 167 | int tprecision = getTickPrecision(); |
168 168 | if (tprecision >=0) { |
169 169 | stringstream ss; |
170 + | if (tprecision > 5) tprecision=5; |
170 171 | ss.precision(tprecision); |
171 172 | ss << fixed << value; |
172 173 | return QString(ss.str().c_str()); |
173 174 | } else { // with shared axis, ticks are not set |
174 175 | return QwtScaleDraw::label(value); |
175 176 | } |
176 177 | } |
177 178 | } |
178 179 | |
179 180 | int QPScaleDraw::getTickPrecision() const { |