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

Calling clear() on QBarCategoryAxis does not clear category names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6.2
    • Charts
    • None
    • Windows

    Description

      In a QChart with a QBarCategoryAxis attached, after having set some category names with axis->setCategories(...), they aren't actually cleared after calling axis->clear() as they are supposed to be.

      Calling axis->setCategories({}) (with empty list) produces the same result (visually), at least in an otherwise empty chart.

      As a workaround, xAxis->setCategories({""}) produces the desired result.

      See attachements for minimal working example.

      Attachments

        1. main.cpp
          0.2 kB
        2. mainwindow.cpp
          2 kB
        3. mainwindow.h
          0.2 kB
        4. MWE.pro
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            svetter Simon Vetter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes