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

GraphsView: Y-axis title can be too close to edge

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.2, 6.9
    • 6.8.1
    • Graphs: 2D
    • None
    • Windows 10 22H2, MSVC 2022 x64

    Description

      Code

      import QtQuick
      import QtGraphs
      
      Window {
          width: 400
          height: 300
          visible: true
          title: "Bars"
      
          GraphsView {
              anchors.fill: parent
      
              axisX: BarCategoryAxis {
                  titleText: "Year"
                  categories: [2023, 2024, 2025]
              }
              axisY: ValueAxis {
                  titleText: "Profits"
                  max: 600
              }
      
              BarSeries {
                  BarSet {
                      values: [300, 400, 500]
                  }
              }
          }
      }
      

       

      Actual Result
      The y-axis title is clipped by the edge of the window:

      Expected Result
      Changing the text from "Profits" to "Profits ($)" seems to fix it:

      Attachments

        1. y-title-bad.png
          y-title-bad.png
          11 kB
        2. y-title-good.png
          y-title-good.png
          10 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kagro Kaj Grönholm
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes