X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=blobdiff_plain;f=qml%2Fpages%2FStats.qml;fp=qml%2Fpages%2FStats.qml;h=e082b0f6f556bd9b77e8746650244678dc5a64a1;hp=ad2dcae232d12711b7924d88d2fbe574ffe5a21c;hb=76b5f460f9a5052571d730918b2ee778753f4c59;hpb=41ee443df2b12e7a4373be580006f57cc5fd768a diff --git a/qml/pages/Stats.qml b/qml/pages/Stats.qml index ad2dcae..e082b0f 100644 --- a/qml/pages/Stats.qml +++ b/qml/pages/Stats.qml @@ -72,6 +72,59 @@ Page { } } + SlideshowView { + id: graphsView + width: isPortrait ? parent.width : parent.width * 0.5 + height: (isPortrait ? statsPage.height / 2.0 : statsPage.height) - Theme.paddingLarge + itemWidth: width + clip: true + + y: (isPortrait ? (statsPage.height / 2.0) : statsColumn.y) + + model: statsmodel + delegate: Rectangle { + width: graphsView.itemWidth + height: graphsView.height + color: "transparent" + + SectionHeader { + id: sectionHeaderItem + text: "item " + index + } + + Graph { + id: graph + width: parent.width - 2 * Theme.horizontalPageMargin + anchors.top: sectionHeaderItem.bottom + height: (isPortrait ? (statsPage.height / 2.0) - Theme.paddingLarge : statsPage.height - Theme.paddingLarge - headerItem.height) - sectionHeaderItem.height + anchors.horizontalCenter: parent.horizontalCenter + model: values + labelsx: labels + //labelsy: ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"] + unitsy: "%" + primary: Theme.primaryColor + secondary: Theme.highlightColor + highlight: Theme.highlightColor + miny: 0.0 + maxy: 1.0 + stepy: 0.1 + gap: 0.1 + fontsize: Theme.fontSizeExtraSmall + /* + PropertyAnimation on animate { + id: animx + duration: 2000 + easing.type: Easing.InOutExpo + from: 0.0 + to: 1.0 + } + */ + } + + } + } + + /* Column { id: graphsColumn spacing: Theme.paddingLarge @@ -105,5 +158,6 @@ Page { } } } + */ } }