@@ -197,7 +197,7 void QCategoriesAxisPrivate::setMinCategory(const QString& minCategory) | |||
|
197 | 197 | return; |
|
198 | 198 | } |
|
199 | 199 | |
|
200 | int maxIndex = m_max; | |
|
200 | int maxIndex = qFloor(m_max); | |
|
201 | 201 | if (minIndex > maxIndex) { |
|
202 | 202 | maxIndex = m_categories.count()-1; |
|
203 | 203 | } |
@@ -211,10 +211,12 void QCategoriesAxisPrivate::setMaxCategory(const QString& maxCategory) | |||
|
211 | 211 | if (maxIndex == -1) { |
|
212 | 212 | return; |
|
213 | 213 | } |
|
214 | if (maxIndex < m_min) { | |
|
215 | m_min = 0; | |
|
214 | ||
|
215 | int minIndex = qCeil(m_min); | |
|
216 | if (maxIndex < minIndex) { | |
|
217 | minIndex = 0; | |
|
216 | 218 | } |
|
217 |
setRange( |
|
|
219 | setRange(minIndex - 0.5, maxIndex + 0.5); | |
|
218 | 220 | } |
|
219 | 221 | |
|
220 | 222 | void QCategoriesAxisPrivate::setRangeCategory(const QString& minCategory, const QString& maxCategory) |
General Comments 0
You need to be logged in to leave comments.
Login now