Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Glow and ChartView



  • Im trying to get glowing LineSeries in chartview. On the start everything is ok, but with every time when i update data(append new value to the series) glowing area is expanding. It looks like its overpaiting glow effect on glow effect. How to fix it ? Below my test code. Testing on raspberry pi 3. Gif with example execution

    0_1539867661833_glow problem.gif

    import QtQuick 2.0
    import QtQuick.Controls 2.2
    import QtCharts 2.2
    import QtGraphicalEffects 1.0
    
    Page {
    
        id: window
        visible: true
        width: 800
        height: 480
        property var index: 0
        LinearGradient {
            anchors.fill: parent
            start: Qt.point(0, 0)
            end: Qt.point(parent.width, 0)
            gradient: Gradient {
                GradientStop {
                    position: 0.0
                    color: "black"
                }
                GradientStop {
                    position: 1.0
                    color: "#011c3a"
                }
            }
        }
        ChartView {
            id: chartView
            backgroundColor: "transparent"
            anchors.fill: parent
    
            ValueAxis {
                id: valueAxisX
                min: 0
                max: 10
                visible: false
            }
    
            ValueAxis {
                id: valueAxisY
                min: 0
                max: 10
                visible: false
            }
    
            LineSeries {
                id: series
                axisX: valueAxisX
                axisY: valueAxisY
                color: "blue"
            }
    
            Glow {
                anchors.fill: chartView
                radius: 18
                samples: 37
                color: "#15bdff"
                source: chartView
            }
            Timer {
                interval: 500
                running: true
                repeat: true
                onTriggered: {
                    series.append(index, index)
                    index++
                }
            }
        }
    }
    
    


  • Hello @k-kustra. Do you check this article. Maybe it would help...

    Good luck.


Log in to reply