QCustomPlot Discussion and Comments

Making histogram bars show their valuesReturn to overview


Is there any way to make the histogram bars show their values on top of each bar?

Something like this:

2, 6, 10, 14...

(Percentages are not important)

Thank you!

While that specific feature is indeed planned for a future version of the QCPBars, you can still do it now via text items. Have a look at QCPItemText. You can place them at the plot coordinates of the histogram data points. If your histogram data changes, you will also need to update the label positions (and texts), so you might want to combine both QCPBars and the collection of QCPItemText into a new class that manages that automatically.

The implementation of this change in the QCPBars has alreay been done?