QtCharts bar graph: hiding the label of a qBarSet
-
I need asimple bar graph as indicated below.
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?
-
@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! :)