diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-09-29 15:14:25 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-09-30 10:08:14 +0300 |
commit | 6821c16e36a7454627ac9a18cd1d8b0f0bd9246f (patch) | |
tree | c2b1197792f511dc53393fc8372fc2bc0852a958 /tests/barstest/chart.cpp | |
parent | 084010113485262ad4495e0af2d57ad3aa0fcf7e (diff) |
Make background margin configurable
Added margin as abstract graph property.
If the margin is narrow, the positions of theedge labels of the axes
are adjusted to avoid overlap with edge labels on other axes.
Task-number: QTRD-3204
Change-Id: I7fa5a04c8f2091519d99689ef2f6cbcf799fb15e
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'tests/barstest/chart.cpp')
-rw-r--r-- | tests/barstest/chart.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/barstest/chart.cpp b/tests/barstest/chart.cpp index d7b23719..6be5e66d 100644 --- a/tests/barstest/chart.cpp +++ b/tests/barstest/chart.cpp @@ -1531,6 +1531,12 @@ void GraphModifier::setFloorLevel(int value) qDebug() << "Floor level:" << value; } +void GraphModifier::setGraphMargin(int value) +{ + m_graph->setMargin(qreal(value) / 100.0); + qDebug() << "Setting margin:" << m_graph->margin() << value; +} + void GraphModifier::populateFlatSeries(QBar3DSeries *series, int rows, int columns, float value) { QBarDataArray *dataArray = new QBarDataArray; |