From 7ebf993f12e2adb7685dc6b7550abf3cf547c31b Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 10 Sep 2011 18:31:28 +1000 Subject: [PATCH] Fix SummaryChart tooltip values --- Graphs/gBarChart.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Graphs/gBarChart.cpp b/Graphs/gBarChart.cpp index 566aa7ae..0b38bedd 100644 --- a/Graphs/gBarChart.cpp +++ b/Graphs/gBarChart.cpp @@ -379,7 +379,14 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event) QDateTime dt=QDateTime::fromTime_t(hl_day*86400); - QString z=dt.date().toString(Qt::SystemLocaleShortDate)+"\n"+m_label+"="+QString::number(d.value()[0],'f',2);; + + EventDataType val; + if (m_graphtype==GT_BAR) { + val=d.value()[0]; + } else { + val=d.value()[1]; + } + QString z=dt.date().toString(Qt::SystemLocaleShortDate)+"\n"+m_label+"="+QString::number(val,'f',2);; graph->ToolTip(z,x,y,1500); return true; }