From 245925adf4498303a1cb1076eadb5d529f9d2051 Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Wed, 7 Jun 2023 14:55:51 +0100 Subject: Get rid of the blob graph This fixes an issue where a single bar could fill the entire width of the graph, making a blob shape This is done by setting an effective minimum of the number of bars that the graph sees, so that an individual bar can't be wider than the width seen when there's three bars --- src/graphs/BarGraph.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/graphs/BarGraph.qml b/src/graphs/BarGraph.qml index 3f40130..fd5e947 100644 --- a/src/graphs/BarGraph.qml +++ b/src/graphs/BarGraph.qml @@ -62,7 +62,7 @@ Item { Repeater { id: barsRepeater delegate: Item { //this contains the graph column and positions it correctly - width: (barGraph.width-markerParent.width)/barGraph.valuesArr.length + width: (barGraph.width-markerParent.width)/Math.max(barGraph.valuesArr.length,3) height: parent.height Rectangle { id: bar -- cgit v1.2.3-70-g09d2