Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to remove this rectangle in Charts

How to remove this rectangle in Charts

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 344 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sajjad Ali
    wrote on last edited by Sajjad Ali
    #1

    Hello, I have removed title. But this little box is not going. How can I remove that.
    be42335f-3c90-44e9-b310-d59cacf8eae1-image.png

    The little box on top. Blue one

                        ChartView {
                            //title: "Line Chart"
                            anchors.fill: parent
                            antialiasing: true
                            plotAreaColor: "#D0D2CF"
                            LineSeries {
                                //name: "Line"
                                color: "#3CC6FF"
                                width: 2
                                XYPoint {
                                    x: 0
                                    y: 0
                                }
                                XYPoint {
                                    x: 0.5
                                    y: 0.75
                                }
                                XYPoint {
                                    x: 1.1
                                    y: 2.1
                                }
                                XYPoint {
                                    x: 1.9
                                    y: 3.3
                                }
                                XYPoint {
                                    x: 2.1
                                    y: 2.1
                                }
                                XYPoint {
                                    x: 2.9
                                    y: 4.9
                                }
                                XYPoint {
                                    x: 3.4
                                    y: 3.0
                                }
                                XYPoint {
                                    x: 4.1
                                    y: 3.3
                                }
                            }
                        }
    
    jsulmJ 1 Reply Last reply
    0
    • S Sajjad Ali

      Hello, I have removed title. But this little box is not going. How can I remove that.
      be42335f-3c90-44e9-b310-d59cacf8eae1-image.png

      The little box on top. Blue one

                          ChartView {
                              //title: "Line Chart"
                              anchors.fill: parent
                              antialiasing: true
                              plotAreaColor: "#D0D2CF"
                              LineSeries {
                                  //name: "Line"
                                  color: "#3CC6FF"
                                  width: 2
                                  XYPoint {
                                      x: 0
                                      y: 0
                                  }
                                  XYPoint {
                                      x: 0.5
                                      y: 0.75
                                  }
                                  XYPoint {
                                      x: 1.1
                                      y: 2.1
                                  }
                                  XYPoint {
                                      x: 1.9
                                      y: 3.3
                                  }
                                  XYPoint {
                                      x: 2.1
                                      y: 2.1
                                  }
                                  XYPoint {
                                      x: 2.9
                                      y: 4.9
                                  }
                                  XYPoint {
                                      x: 3.4
                                      y: 3.0
                                  }
                                  XYPoint {
                                      x: 4.1
                                      y: 3.3
                                  }
                              }
                          }
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Sajjad-Ali My guess is: by setting "visible" to false in https://doc.qt.io/qt-6/qml-qtcharts-legend.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      mzimmersM 1 Reply Last reply
      1
      • jsulmJ jsulm

        @Sajjad-Ali My guess is: by setting "visible" to false in https://doc.qt.io/qt-6/qml-qtcharts-legend.html

        mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        @jsulm yep.

        ChartView {
            legend.visible: false
            ...
        

        It can be a little confusing because the legend property is read-only (according to a run-time error I get), but the visible property of Legend is writable.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved