@@ -70,7 +70,7 QStringList ChartBarCategoryAxisX::createCategoryLabels(const QVector<qreal>& la | |||||
70 |
|
70 | |||
71 | for (int i = 0; i < layout.count() - 1; ++i) { |
|
71 | for (int i = 0; i < layout.count() - 1; ++i) { | |
72 | qreal x = qFloor((((layout[i] + layout[i + 1]) / 2 - gridRect.left()) * d + min() + 0.5)); |
|
72 | qreal x = qFloor((((layout[i] + layout[i + 1]) / 2 - gridRect.left()) * d + min() + 0.5)); | |
73 | if (x < max() && (x >= 0)) { |
|
73 | if (x < max() && (x >= 0) && x < m_categoriesAxis->categories().count()) { | |
74 | result << m_categoriesAxis->categories().at(x); |
|
74 | result << m_categoriesAxis->categories().at(x); | |
75 | } else { |
|
75 | } else { | |
76 | // No label for x coordinate |
|
76 | // No label for x coordinate |
General Comments 0
You need to be logged in to leave comments.
Login now