diff options
author | Titta Heikkala <titta.heikkala@qt.io> | 2017-02-02 07:17:54 +0200 |
---|---|---|
committer | Titta Heikkala <titta.heikkala@qt.io> | 2017-02-02 07:29:04 +0000 |
commit | 71302b3895afc20ef37c62749105991b070b55b3 (patch) | |
tree | 11a05338446abff00d3e41eaf65cfe755f2da244 /tradeshow/iot-sensortag/resources/base | |
parent | 71859115ecb5defd82687a03fbbe56a6bc985255 (diff) |
iot-sensortag: Add glow to gyro and magnetometer charts
Glow effect added to gyro and magnetometer charts.
Change-Id: Id219a687c9432c16326d578ba2816bc39ac09c2c
Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/resources/base')
-rw-r--r-- | tradeshow/iot-sensortag/resources/base/GyroChart.qml | 26 | ||||
-rw-r--r-- | tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml | 11 |
2 files changed, 25 insertions, 12 deletions
diff --git a/tradeshow/iot-sensortag/resources/base/GyroChart.qml b/tradeshow/iot-sensortag/resources/base/GyroChart.qml index 1852641..2fb175c 100644 --- a/tradeshow/iot-sensortag/resources/base/GyroChart.qml +++ b/tradeshow/iot-sensortag/resources/base/GyroChart.qml @@ -50,6 +50,7 @@ import QtQuick 2.5 import QtCharts 2.1 import SensorTag.DataProvider 1.0 +import QtGraphicalEffects 1.0 BaseChart { id: gyroHolderRect @@ -58,8 +59,6 @@ BaseChart { property int gyroSeriesIndex: 0 property int maxGyroReadings: 24 - readonly property color chartColor: "#15bdff" - readonly property color gridColor: "#005b80" readonly property string xColor: "#15bdff" readonly property string yColor: "white" readonly property string zColor: "fuchsia" @@ -92,6 +91,14 @@ BaseChart { gyroSeriesIndex++; } + Glow { + anchors.fill: chartView + radius: 30 + samples: 30 + color: "orange" + source: chartView + } + ChartView { id: chartView @@ -115,7 +122,6 @@ BaseChart { min: 0 max: maxGyroReadings + 1 tickCount: 13 - color: chartColor visible: false } @@ -125,17 +131,15 @@ BaseChart { min: 0 max: 360 tickCount: 11 - color: chartColor visible: false } - ScatterSeries { id: gyroSeriesX axisX: valueAxisX axisY: valueAxisY color: xColor - borderWidth: 0 - markerSize: 6 + borderColor: xColor + markerSize: 8 name: "Gyro X" } ScatterSeries { @@ -143,8 +147,8 @@ BaseChart { axisX: valueAxisX axisY: valueAxisY color: yColor - borderWidth: 0 - markerSize: 6 + borderColor: yColor + markerSize: 8 name: "Gyro Y" } ScatterSeries { @@ -152,8 +156,8 @@ BaseChart { axisX: valueAxisX axisY: valueAxisY color: zColor - borderWidth: 0 - markerSize: 6 + borderColor: zColor + markerSize: 8 name: "Gyro Z" } } diff --git a/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml b/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml index 699f537..6e3af9d 100644 --- a/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml +++ b/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml @@ -50,6 +50,7 @@ import QtQuick 2.5 import QtCharts 2.1 import SensorTag.DataProvider 1.0 +import QtGraphicalEffects 1.0 BaseChart { id: magnetHolderRect @@ -87,6 +88,14 @@ BaseChart { magneticSeriesIndex++; } + Glow { + anchors.fill: chartView + radius: 18 + samples: 30 + color: "#15bdff" + source: chartView + } + PolarChartView { id: chartView @@ -110,7 +119,7 @@ BaseChart { labelsVisible: false gridVisible: false min: 0 - max: maxNumOfMagnReadings + 1 + max: maxNumOfMagnReadings tickCount: 2 color: chartColor visible: false |