Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132402

SplineSeries remove() malfunctions when used with GraphPointAnimation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.1
    • Graphs: 2D
    • None
    • All

    Description

      SplineSeries remove(0), with GraphPointAnimation present in the series, does not remove the first point, but the last one instead.

      Minimal reproducible example:

      import QtQuick
      import QtGraphs
      
      Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Graphs 2D - remove() with GraphPointAnimation bug")
      
        GraphsView {
          id: graphsView
      
          anchors.fill: parent
      
          axisX: ValueAxis {}
          axisY: ValueAxis {}
      
          SplineSeries {
            id: series1
      
            GraphTransition {
              // Comment this out to compare series1.remove() behavior
              GraphPointAnimation { duration: 1000 }
            }
      
            XYPoint { x: 0.0; y: 9.0 }
            XYPoint { x: 1.0; y: 3.0 }
            XYPoint { x: 2.0; y: 7.0 }
            XYPoint { x: 3.0; y: 1.0 }
            XYPoint { x: 4.0; y: 8.5 }
            XYPoint { x: 5.0; y: 2.4 }
            XYPoint { x: 6.0; y: 6.0 }
            XYPoint { x: 7.0; y: 1.6 }
            XYPoint { x: 8.0; y: 9.5 }
            XYPoint { x: 9.0; y: 3.9 }
            XYPoint { x: 10.0; y: 9.9 }
          }
        }
      
        Timer {
          interval: 1000
          running: true
          repeat: true
          onTriggered: {
            // Should remove from the left
            series1.remove(0)
          }
        }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kagro Kaj Grönholm
            bartoszrudzki Bartosz Rudzki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes