pcp
[Top] [All Lists]

PCP Updates: RHBZ 1348349: pmchart(1) pop up for displaying metric value

To: PCP Mailing List <pcp@xxxxxxxxxxx>
Subject: PCP Updates: RHBZ 1348349: pmchart(1) pop up for displaying metric values
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Mon, 12 Sep 2016 15:17:23 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
The changes below are not quite ready for merge yet, but definitely ready for review.

Some notes:
  • The enhancement request actually asked for a right click to trigger the pop-up, but the QwtPlotPicker class does not appear to support a signal for right click. It supports a signal for "selected" which responds to a left click.

  • The left click previously triggered the generation of "cross hairs" at the selected location and a display of the selected coordinates below the chart. This behaviour remains intact.

  • The left click now additionally generates a pop up showing the values of each metric on the chart at the point on each curve which is closest to the selected point.

  • Dragging the mouse across the chart with the left button held previously generated and moved the same cross hairs mentioned above as the mouse moves. This behaviour remains intact.

  • The pop up mentioned above is also generated when the mouse button is release after dragging the mouse, as described above. This is because releasing the mouse button generates the same "selected" signal as is generated by a left click. This could probably be suppressed using some state flags, if this is not the desired behaviour.
Further work:
  • I want to try to make the pop up wide enough to display each metric on a separate line. The default width is not always sufficient for this.

  • Other suggestions for improvement are also welcome
---------------------------------------------------------------------------------------------------
Changes committed to ssh://git.pcp.io/oss/git/brolley/pcp master

Dave Brolley (1):
ÂÂÂÂÂ RHBZ 1348349: pmchart(1) pop up for displaying metic values.

Âsrc/pmchart/chart.cppÂÂÂ |ÂÂ 84 +++++++++++++++++++++++++++++++----------------
Âsrc/pmchart/chart.hÂÂÂÂÂ |ÂÂÂ 8 +++-
Âsrc/pmchart/sampling.cpp |ÂÂ 22 +++++-------
Â3 files changed, 72 insertions(+), 42 deletions(-)

Details ...

commit d9a339e8662ac635f4fa084f0565e0ee7b0aa93d
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:ÂÂ Mon Sep 12 14:47:38 2016 -0400

ÂÂÂ RHBZ 1348349: pmchart(1) pop up for displaying metic values.
ÂÂ Â
ÂÂÂ Triggered by left click. A pop up will display the values for
 each metric on the current plot at the point on the curve
ÂÂÂ closest to the position of the mouse click.

<Prev in Thread] Current Thread [Next in Thread>