diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-03-28 14:51:26 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-04-01 08:28:57 +0300 |
commit | fe3c9ec0a9fb734e83eb70bc725c303a9d36cd6d (patch) | |
tree | 4996d94f8a7e4498fa8431c9dcc65526a99889bb /src/datavisualization/engine/bars3dcontroller.cpp | |
parent | 25f48fc046bbce83abeeef0a6081de9f5efcd6d7 (diff) |
Axis formatter customization example
Also refactored the formatter api somewhat:
- Removed virtual from allowNegatives and allowZero and added a
setter function for those. This will make it cleaner if we need to
add similar properties to the axis formatter in the future, as
no new virtual methods can be added without breaking BC.
- Changed the labelValues array to labelStrings list, as it makes
more sense to directly format the strings in recalculate.
Change-Id: I3ea005afa984bb756845ca356b999762e0807415
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/bars3dcontroller.cpp')
-rw-r--r-- | src/datavisualization/engine/bars3dcontroller.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/datavisualization/engine/bars3dcontroller.cpp b/src/datavisualization/engine/bars3dcontroller.cpp index c6c1a9f1..0b2a4834 100644 --- a/src/datavisualization/engine/bars3dcontroller.cpp +++ b/src/datavisualization/engine/bars3dcontroller.cpp @@ -545,9 +545,9 @@ void Bars3DController::adjustAxisRanges() } // Call private implementations of setRange to avoid unsetting auto adjust flag if (adjustZ) - categoryAxisZ->dptr()->setRange(0.0f, float(maxRowCount)); + categoryAxisZ->dptr()->setRange(0.0f, float(maxRowCount), true); if (adjustX) - categoryAxisX->dptr()->setRange(0.0f, float(maxColumnCount)); + categoryAxisX->dptr()->setRange(0.0f, float(maxColumnCount), true); } // Now that we know the row and column ranges, figure out the value axis range @@ -582,7 +582,7 @@ void Bars3DController::adjustAxisRanges() minValue = 0.0f; maxValue = 1.0f; } - valueAxis->dptr()->setRange(minValue, maxValue); + valueAxis->dptr()->setRange(minValue, maxValue, true); } } } |