summaryrefslogtreecommitdiffstats
path: root/examples/spectrum
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-05-17 08:21:36 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-05-17 08:39:17 +0300
commit901d814f94ff502687cc36c94af6daf50c7d43eb (patch)
treece533f2ca5ff690f57b1c5ec26474fffbda5f06a /examples/spectrum
parent64d9d0d2aed2b0046fc8aac8696484e7c6f9df21 (diff)
Added support for setting tick count
Change-Id: I1dc92d0241d1ae64d0e515595edfaefb50cb22bd Change-Id: I1dc92d0241d1ae64d0e515595edfaefb50cb22bd Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/spectrum')
-rw-r--r--examples/spectrum/spectrumapp/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/spectrum/spectrumapp/main.cpp b/examples/spectrum/spectrumapp/main.cpp
index b6f9eabe..4296a347 100644
--- a/examples/spectrum/spectrumapp/main.cpp
+++ b/examples/spectrum/spectrumapp/main.cpp
@@ -88,6 +88,9 @@ MainApp::MainApp(Q3DBars *window)
m_chart->setupSampleSpace(SpectrumNumBands, SpectrumNumBands * 2);
// Disable grid
m_chart->setGridEnabled(false);
+ // Disable auto-scaling of height by defining tick count and step, even though we don't draw grid
+ // By setting count to 1 and step to the max we can get, we lock the scale of the bars.
+ m_chart->setTickCount(1, 1.0f);
// Disable shadows
m_chart->setShadowQuality(ShadowNone);
#if USE_CONES