From ffba0218893cd25b08718d4d6fd0c40c95aecf47 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 25 Jun 2014 14:45:01 +0300 Subject: 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 --- .../qmlspectrogram/qml/qmlspectrogram/main.qml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'examples/datavisualization') 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 } } } -- cgit v1.2.3