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