diff options
Diffstat (limited to 'tests/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml')
-rw-r--r-- | tests/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml index fc651866..0367037b 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.1 +import QtCommercial.Chart 1.4 ChartView { title: "Stacked bar series" @@ -33,6 +33,7 @@ ChartView { HorizontalStackedBarSeries { id: mySeries name: "bar" + labelsFormat: "@value"; axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); @@ -61,5 +62,18 @@ ChartView { + " " + status + " " + index); onLabelsVisibleChanged: console.log("horizontalStackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); onCountChanged: console.log("horizontalStackedBarSeries.onCountChanged: " + count); + onLabelsFormatChanged: console.log( + "horizontalStackedBarSeries.onLabelsFormatChanged: " + + format); + onLabelsPositionChanged: console.log( + "horizontalStackedBarSeries.onLabelsPositionChanged: " + + series.labelsPosition); + + function changeLabelsPosition() { + if (labelsPosition === BarSeries.LabelsCenter) + labelsPosition = BarSeries.LabelsInsideEnd; + else + labelsPosition = BarSeries.LabelsCenter; + } } } |