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

QtCharts bar graph: hiding the label of a qBarSet

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 986 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 23 Oct 2020, 13:25 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?

    J 1 Reply Last reply 23 Oct 2020, 13:38
    0
    • W willemf
      23 Oct 2020, 13:25

      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?

      J Offline
      J Offline
      JonB
      wrote on 23 Oct 2020, 13:38 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 23 Oct 2020, 19:01
      0
      • J JonB
        23 Oct 2020, 13:38

        @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 23 Oct 2020, 19:01 last edited by
        #3

        @JonB
        Thanks for your time!

        1 Reply Last reply
        0

        3/3

        23 Oct 2020, 19:01

        • Login

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