Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCharts bar graph: hiding the label of a qBarSet
Qt 6.11 is out! See what's new in the release blog

QtCharts bar graph: hiding the label of a qBarSet

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.2k Views
  • 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.
  • W Offline
    W Offline
    willemf
    wrote on last edited by
    #1

    I need asimple bar graph as indicated below.
    Screenshot from 2020-10-23 15-12-01.png

    This is actually a stackedBarGraph that has been simplified. However, whenever a qBarSet is created, a label is required that is shown as part of the legend. This is shown as the blue dot and caption above the graph. I did set Legend->setVisible() to FALSe but it does not hide this label. In my case the label is superfluous (there is only one series) and I cannot hide the label. Is there any way to remove this?

    JonBJ 1 Reply Last reply
    0
    • W willemf

      I need asimple bar graph as indicated below.
      Screenshot from 2020-10-23 15-12-01.png

      This is actually a stackedBarGraph that has been simplified. However, whenever a qBarSet is created, a label is required that is shown as part of the legend. This is shown as the blue dot and caption above the graph. I did set Legend->setVisible() to FALSe but it does not hide this label. In my case the label is superfluous (there is only one series) and I cannot hide the label. Is there any way to remove this?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @willemf said in QtCharts bar graph: hiding the label of a qBarSet:

      I did set Legend->setVisible() to FALSe but it does not hide this label

      https://www.qtcentre.org/threads/67441-qchart-hide-legend-for-part-of-series is worth a read. Initially it says you can't do anything. Then someone says what you have tried ought to work. If not, what about the suggestion there of:

      // we select the marker associated with serie_without_marker
      chart.legend().markers(serie_without_marker)[0].setVisible(false);
      

      That's all I know, so don't ask me any more! :)

      W 1 Reply Last reply
      0
      • JonBJ JonB

        @willemf said in QtCharts bar graph: hiding the label of a qBarSet:

        I did set Legend->setVisible() to FALSe but it does not hide this label

        https://www.qtcentre.org/threads/67441-qchart-hide-legend-for-part-of-series is worth a read. Initially it says you can't do anything. Then someone says what you have tried ought to work. If not, what about the suggestion there of:

        // we select the marker associated with serie_without_marker
        chart.legend().markers(serie_without_marker)[0].setVisible(false);
        

        That's all I know, so don't ask me any more! :)

        W Offline
        W Offline
        willemf
        wrote on last edited by
        #3

        @JonB
        Thanks for your time!

        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