diff --git a/src/view/StatsPanel.cpp b/src/view/StatsPanel.cpp index 441a2d1..96a26e8 100644 --- a/src/view/StatsPanel.cpp +++ b/src/view/StatsPanel.cpp @@ -255,7 +255,7 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT i=0; for (account = 0, i = 0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); - account++, accountIt++, i++) + account++, accountIt++) { if (_account->item(account)->checkState() != Qt::Checked) continue; @@ -340,9 +340,13 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT xAxis->setLabels(xlabels); xAxis->setShortLabels(xlabels); - KDChart::TextAttributes axisTextAttr(xAxis->textAttributes()); - axisTextAttr.setRotation(-60); - xAxis->setTextAttributes(axisTextAttr); + // Rotate only for months names + if (monthFrom != monthTo || yearFrom != yearTo) + { + KDChart::TextAttributes axisTextAttr(xAxis->textAttributes()); + axisTextAttr.setRotation(-60); + xAxis->setTextAttributes(axisTextAttr); + } _plot->lineDiagram()->addAxis(xAxis); _plot->lineDiagram()->addAxis(yAxis);