aboutsummaryrefslogtreecommitdiff
path: root/src/graphs
diff options
context:
space:
mode:
authorArseniy Movshev <dodoradio@outlook.com>2023-06-07 14:55:51 +0100
committerArseniy Movshev <dodoradio@outlook.com>2023-06-07 14:55:51 +0100
commit245925adf4498303a1cb1076eadb5d529f9d2051 (patch)
tree87d3ca209d747b2c4c75323848528ec6046c09f0 /src/graphs
parent95edb599eb148d945c62fbb3fc200bfd5601f101 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/graphs/BarGraph.qml2
1 files changed, 1 insertions, 1 deletions
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