Index: trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp	(revision 102643)
+++ trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp	(revision 102644)
@@ -1027,4 +1027,16 @@
 }
 
+void UIMetric::addData(int iDataSeriesIndex, quint64 iData, const QString &strLabel)
+{
+    if (iDataSeriesIndex >= DATA_SERIES_SIZE)
+        return;
+
+    addData(iDataSeriesIndex, iData);
+
+    m_labels[iDataSeriesIndex].enqueue(strLabel);
+    if (m_data[iDataSeriesIndex].size() > m_iMaximumQueueSize)
+        m_labels[iDataSeriesIndex].dequeue();
+}
+
 const QQueue<quint64> *UIMetric::data(int iDataSeriesIndex) const
 {
@@ -1495,5 +1507,5 @@
         ULONG aPctOther;
         m_comMachineDebugger.GetCPULoad(0x7fffffff, aPctExecuting, aPctHalted, aPctOther);
-        updateCPUGraphsAndMetric(aPctExecuting, aPctOther);
+        updateCPUChart(aPctExecuting, aPctOther);
     }
 
@@ -1503,5 +1515,5 @@
         quint64 cbNetworkTotalTransmitted = 0;
         UIMonitorCommon::getNetworkLoad(m_comMachineDebugger, cbNetworkTotalReceived, cbNetworkTotalTransmitted);
-        updateNetworkGraphsAndMetric(cbNetworkTotalReceived, cbNetworkTotalTransmitted);
+        updateNetworkChart(cbNetworkTotalReceived, cbNetworkTotalTransmitted);
     }
 
@@ -1511,5 +1523,5 @@
         quint64 cbDiskIOTotalRead = 0;
         UIMonitorCommon::getDiskLoad(m_comMachineDebugger, cbDiskIOTotalWritten, cbDiskIOTotalRead);
-        updateDiskIOGraphsAndMetric(cbDiskIOTotalWritten, cbDiskIOTotalRead);
+        updateDiskIOChart(cbDiskIOTotalWritten, cbDiskIOTotalRead);
     }
 
@@ -1721,5 +1733,5 @@
 }
 
-void UIVMActivityMonitorLocal::updateCPUGraphsAndMetric(ULONG iExecutingPercentage, ULONG iOtherPercentage)
+void UIVMActivityMonitorLocal::updateCPUChart(ULONG iExecutingPercentage, ULONG iOtherPercentage)
 {
     UIMetric &CPUMetric = m_metrics[m_strCPUMetricName];
@@ -1761,5 +1773,5 @@
 }
 
-void UIVMActivityMonitorLocal::updateNetworkGraphsAndMetric(quint64 uReceiveTotal, quint64 uTransmitTotal)
+void UIVMActivityMonitorLocal::updateNetworkChart(quint64 uReceiveTotal, quint64 uTransmitTotal)
 {
     UIMetric &NetMetric = m_metrics[m_strNetworkMetricName];
@@ -1795,5 +1807,5 @@
 }
 
-void UIVMActivityMonitorLocal::updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead)
+void UIVMActivityMonitorLocal::updateDiskIOChart(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead)
 {
     UIMetric &diskMetric = m_metrics[m_strDiskIOMetricName];
@@ -1942,5 +1954,5 @@
         {
             float fValue = data[i].toFloat();
-            updateCPUGraphsAndMetric((ULONG) fValue, 0);
+            updateCPUChart((ULONG) fValue, timeStamps[i]);
         }
         else if (enmMetricType == KMetricType_NetworksBytesOut)
@@ -2016,8 +2028,8 @@
 }
 
-void UIVMActivityMonitorCloud::updateCPUGraphsAndMetric(ULONG iLoadPercentage, ULONG /*iOtherPercentage*/)
+void UIVMActivityMonitorCloud::updateCPUChart(ULONG iLoadPercentage, const QString &strLabel)
 {
     UIMetric &CPUMetric = m_metrics[m_strCPUMetricName];
-    CPUMetric.addData(0, iLoadPercentage);
+    CPUMetric.addData(0, iLoadPercentage, strLabel);
     CPUMetric.setMaximum(100);
     if (m_infoLabels.contains(m_strCPUMetricName)  && m_infoLabels[m_strCPUMetricName])
@@ -2037,10 +2049,9 @@
 }
 
-void UIVMActivityMonitorCloud::updateRAMGraphsAndMetric(quint64 /*iTotalRAM*/, quint64 /*iFreeRAM*/){}
-void UIVMActivityMonitorCloud::updateNetworkGraphsAndMetric(quint64 uReceiveRate, quint64 uTransmitRate)
+void UIVMActivityMonitorCloud::updateNetworkChart(quint64 uReceiveRate, quint64 uTransmitRate, const QString &strLabel)
 {
     UIMetric &networkMetric = m_metrics[m_strNetworkMetricName];
-    networkMetric.addData(0, uReceiveRate);
-    networkMetric.addData(1, uTransmitRate);
+    networkMetric.addData(0, uReceiveRate, strLabel);
+    networkMetric.addData(1, uTransmitRate, strLabel);
 
     if (m_infoLabels.contains(m_strNetworkMetricName)  && m_infoLabels[m_strNetworkMetricName])
@@ -2056,12 +2067,10 @@
 }
 
-void UIVMActivityMonitorCloud::updateDiskIOGraphsAndMetric(quint64 uWriteRate, quint64 uReadRate)
+void UIVMActivityMonitorCloud::updateDiskIOChart(quint64 uWriteRate, quint64 uReadRate, const QString &strLabel)
 {
     UIMetric &diskMetric = m_metrics[m_strDiskIOMetricName];
 
-
-    diskMetric.addData(0, uWriteRate);
-    diskMetric.addData(1, uReadRate);
-
+    diskMetric.addData(0, uWriteRate, strLabel);
+    diskMetric.addData(1, uReadRate, strLabel);
 
     if (m_infoLabels.contains(m_strDiskIOMetricName)  && m_infoLabels[m_strDiskIOMetricName])
@@ -2178,5 +2187,5 @@
     if (m_diskReadCache.contains(strTimeStamp))
     {
-        updateDiskIOGraphsAndMetric((quint64) iValue, (quint64) m_diskReadCache[strTimeStamp]);
+        updateDiskIOChart((quint64) iValue, (quint64) m_diskReadCache[strTimeStamp], strTimeStamp);
         m_diskReadCache[strTimeStamp];
     }
@@ -2192,5 +2201,5 @@
     if (m_diskWriteCache.contains(strTimeStamp))
     {
-        updateDiskIOGraphsAndMetric((quint64) m_diskWriteCache[strTimeStamp], (quint64) iValue);
+        updateDiskIOChart((quint64) m_diskWriteCache[strTimeStamp], (quint64) iValue, strTimeStamp);
         m_diskWriteCache.remove(strTimeStamp);
     }
@@ -2205,5 +2214,5 @@
     if (m_networkTransmitCache.contains(strTimeStamp))
     {
-        updateNetworkGraphsAndMetric((quint64) iValue, (quint64) m_networkTransmitCache[strTimeStamp]);
+        updateNetworkChart((quint64) iValue, (quint64) m_networkTransmitCache[strTimeStamp], strTimeStamp);
         m_networkTransmitCache.remove(strTimeStamp);
     }
@@ -2219,5 +2228,5 @@
     if (m_networkReceiveCache.contains(strTimeStamp))
     {
-        updateNetworkGraphsAndMetric((quint64)  m_networkReceiveCache[strTimeStamp], (quint64) iValue);
+        updateNetworkChart((quint64)  m_networkReceiveCache[strTimeStamp], (quint64) iValue, strTimeStamp);
         m_networkReceiveCache.remove(strTimeStamp);
     }
Index: trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h	(revision 102643)
+++ trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h	(revision 102644)
@@ -64,4 +64,10 @@
 #define DATA_SERIES_SIZE 2
 
+struct UIMetricData
+{
+    quint64 m_value;
+    QString m_strLabel;
+};
+
 /** UIMetric represents a performance metric and is used to store data related to the corresponding metric. */
 class UIMetric
@@ -81,4 +87,5 @@
 
     void addData(int iDataSeriesIndex, quint64 fData);
+    void addData(int iDataSeriesIndex, quint64 fData, const QString &strLabel);
     const QQueue<quint64> *data(int iDataSeriesIndex) const;
 
@@ -111,4 +118,5 @@
     quint64 m_iMaximum;
     QQueue<quint64> m_data[DATA_SERIES_SIZE];
+    QQueue<QString> m_labels[DATA_SERIES_SIZE];
     /** The total data (the counter value we get from IMachineDebugger API). For the metrics
       * we get from IMachineDebugger m_data values are computed as deltas of total values t - (t-1) */
@@ -152,12 +160,4 @@
     virtual void reset() = 0;
     virtual void start() = 0;
-
-    /** @name The following functions update corresponding metric charts and labels with new values
-      * @{ */
-        virtual void updateCPUGraphsAndMetric(ULONG iLoadPercentage, ULONG iOtherPercentage) = 0;
-        virtual void updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM) = 0;
-        virtual void updateNetworkGraphsAndMetric(quint64 uReceiveTotal, quint64 uTransmitTotal) = 0;
-        virtual void updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead) = 0;
-    /** @} */
 
     /** Returns a QColor for the chart with @p strChartName and data series with @p iDataIndex. */
@@ -283,8 +283,8 @@
     bool guestAdditionsAvailable(const char *pszMinimumVersion);
     void enableDisableGuestAdditionDependedWidgets(bool fEnable);
-    void updateCPUGraphsAndMetric(ULONG iLoadPercentage, ULONG iOtherPercentage);
+    void updateCPUChart(ULONG iLoadPercentage, ULONG iOtherPercentage);
     void updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM);
-    void updateNetworkGraphsAndMetric(quint64 uReceiveTotal, quint64 uTransmitTotal);
-    void updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead);
+    void updateNetworkChart(quint64 uReceiveTotal, quint64 uTransmitTotal);
+    void updateDiskIOChart(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead);
     void updateVMExitMetric(quint64 uTotalVMExits);
     void resetVMExitInfoLabel();
@@ -332,8 +332,7 @@
     /** @name The following functions update corresponding metric charts and labels with new values
       * @{ */
-        virtual void updateCPUGraphsAndMetric(ULONG iLoadPercentage, ULONG iOtherPercentage) RT_OVERRIDE;
-        virtual void updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM) RT_OVERRIDE;
-        virtual void updateNetworkGraphsAndMetric(quint64 uReceive, quint64 uTransmit) RT_OVERRIDE;
-        virtual void updateDiskIOGraphsAndMetric(quint64 uWriteRate, quint64 uReadRate) RT_OVERRIDE;
+        virtual void updateCPUChart(ULONG iLoadPercentage, const QString &strLabel);
+        virtual void updateNetworkChart(quint64 uReceive, quint64 uTransmit, const QString &strLabel);
+        virtual void updateDiskIOChart(quint64 uWriteRate, quint64 uReadRate, const QString &strLabel);
     /** @} */
     virtual void resetCPUInfoLabel();
