summaryrefslogtreecommitdiffstats
path: root/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml')
-rw-r--r--tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml
index d2aa8812..822a1839 100644
--- a/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml
+++ b/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml
@@ -19,7 +19,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtCommercial.Chart 1.1
+import QtCommercial.Chart 1.4
ChartView {
title: "Percent bar series"
@@ -33,6 +33,7 @@ ChartView {
PercentBarSeries {
id: mySeries
name: "bar"
+ labelsFormat: "@value";
axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
@@ -62,5 +63,16 @@ ChartView {
+ " " + status + " " + index);
onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible);
onCountChanged: console.log("percentBarSeries.onCountChanged: " + count);
+ onLabelsFormatChanged: console.log("percentBarSeries.onLabelsFormatChanged: "
+ + format);
+ onLabelsPositionChanged: console.log("percentBarSeries.onLabelsPositionChanged: "
+ + series.labelsPosition);
+
+ function changeLabelsPosition() {
+ if (labelsPosition === BarSeries.LabelsCenter)
+ labelsPosition = BarSeries.LabelsInsideEnd;
+ else
+ labelsPosition = BarSeries.LabelsCenter;
+ }
}
}