QCustomPlot Discussion and Comments

QCPItemLine in LegendReturn to overview

Hi,

I am trying to put a QCPItemLine into legend but without sucess. The QCPItemLine represent an average of a graph and it sould be in legends as well. Is this possble at all?

cheers
Artad

Why not just add to the label the average value thus:

currentLabel + ", Average = " + QVariant(average).toString()
?

Did you try
QCPLegend::addItem
?