https://bugs.kde.org/show_bug.cgi?id=432220

--- Comment #2 from Sébastien P. <sebastien.pica...@ovh.fr> ---
Created attachment 135333
  --> https://bugs.kde.org/attachment.cgi?id=135333&action=edit
A dirty patch…

My dirty patch… to detect the max scale. But it will probably fail in some
cases (which I do not have :/).
Better idea would be to have a detection of sensor that you have to cumulate
the scale or other not.

diff --git a/faces/facepackages/linechart/contents/ui/LineChart.qml
b/faces/facepackages/linechart/contents/ui/LineChart.qml
index 34f2888..252eafd 100644
--- a/faces/facepackages/linechart/contents/ui/LineChart.qml
+++ b/faces/facepackages/linechart/contents/ui/LineChart.qml
@@ -61,7 +61,7 @@ Charts.LineChart {
         function calcStackedMaximum() {
             let max = 0
             for (let i = 0; i < sensorsModel.sensors.length; ++i) {
-                max += sensorsModel.data(sensorsModel.index(0, i),
Sensors.SensorDataModel.Maximum)
+                if (max<sensorsModel.data(sensorsModel.index(0, i),
Sensors.SensorDataModel.Maximum)) max = sensorsModel.data(sensorsModel.index(0,
i), Sensors.SensorDataModel.Maximum)
             }
             return max
         }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to