summaryrefslogtreecommitdiffstats
path: root/examples/datavisualization
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-25 14:45:01 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-26 10:43:44 +0300
commitffba0218893cd25b08718d4d6fd0c40c95aecf47 (patch)
treec9663278f30d77862d374edcd4cab8f171b5a663 /examples/datavisualization
parent36417dd3660f75c34328c3420bdd512436da86ff (diff)
Add radialLabelOffset property for graphs
This property indicates where radial labels of the polar chart are drawn Task-number: QTRD-3184 Change-Id: I1500e67da5e578b90d679876130c2d56c1d08039 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'examples/datavisualization')
-rw-r--r--examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml17
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml
index 59da4993..a1321c14 100644
--- a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml
+++ b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml
@@ -58,7 +58,6 @@ Window {
labelFormat: "%i"
title: "Angle"
titleVisible: true
- labelAutoRotation: 30
titleFixed: false
}
@@ -78,7 +77,6 @@ Window {
labelFormat: "%i"
title: "Radius"
titleVisible: true
- labelAutoRotation: 30
titleFixed: false
}
@@ -101,6 +99,7 @@ Window {
orthoProjection: true
flipHorizontalGrid: true
+ radialLabelOffset: 0.01 // Add little offset so the labels do not overlap
Surface3DSeries {
id: surfaceSeries
@@ -130,15 +129,15 @@ Window {
id: polarToggle
Layout.fillWidth: true
Layout.fillHeight: true
- text: "Switch to Polar"
+ text: "Switch to polar"
//! [1]
onClicked: {
if (surfaceGraph.polar === false) {
surfaceGraph.polar = true
- text = "Switch to Cartesian"
+ text = "Switch to cartesian"
} else {
surfaceGraph.polar = false
- text = "Switch to Polar"
+ text = "Switch to polar"
}
}
//! [1]
@@ -202,12 +201,12 @@ Window {
Layout.fillWidth: true
Layout.fillHeight: true
text: "Toggle radial label position"
- //visible: surfaceGraph.polar
+ visible: surfaceGraph.polar
onClicked: {
- // TODO
- if (surfaceGraph.theme.backgroundEnabled === true) {
+ if (surfaceGraph.radialLabelOffset > 1.0) {
+ surfaceGraph.radialLabelOffset = 0.01
} else {
- surfaceGraph.theme.backgroundEnabled = true;
+ surfaceGraph.radialLabelOffset = 1.06
}
}
}