Is there a way to control the legend size or legend margin in Qwt so that a string of a fixed length will always be visible?
I am working on a real-time scrolling history plot that adds latest data sample to the right then scrolls time to the left.
I want to append the current value to display in the legend title.
// Create the plot curve
// Create the plot curve
plotCurve = new QwtPlotCurve("Vbattery 00.00");
To copy to clipboard, switch view to plain text mode
// Update curve with latest sample and display value in legend
void plotHistory::update(double newSample)
{
data[SeriesVsource].dataHistory[0] = newSample;
data[SeriesVsource].curve->setTitle(m_formatter.sprintf("Vbattery %04.2f", newSample);
}
// Update curve with latest sample and display value in legend
void plotHistory::update(double newSample)
{
data[SeriesVsource].dataHistory[0] = newSample;
data[SeriesVsource].curve->setTitle(m_formatter.sprintf("Vbattery %04.2f", newSample);
}
To copy to clipboard, switch view to plain text mode
Thanks in advance for any direction,
-Ed
Bookmarks