diff --git a/demos/qmlchart/qml/qmlchart/View5.qml b/demos/qmlchart/qml/qmlchart/View5.qml index d9f2d44..0f2e26d 100644 --- a/demos/qmlchart/qml/qmlchart/View5.qml +++ b/demos/qmlchart/qml/qmlchart/View5.qml @@ -29,11 +29,9 @@ Rectangle { anchors.fill: parent theme: ChartView.ChartThemeLight legend: ChartView.LegendBottom - // TODO: labels defined by x-axis, not by bar series - axisXLabels: ["0", "2008", "1", "2009", "2", "2010", "3", "2012"] + axisXLabels: ["0", "2007", "1", "2008", "2", "2009", "3", "2010", "4", "2011", "5", "2012"] GroupedBarSeries { - barCategories: [ "2008", "2009", "2010", "2011", "2012" ] BarSet { name: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { name: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { name: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/demos/qmlcustommodel/qml/qmlcustommodel/main.qml b/demos/qmlcustommodel/qml/qmlcustommodel/main.qml index ebe6369..f214bf6 100644 --- a/demos/qmlcustommodel/qml/qmlcustommodel/main.qml +++ b/demos/qmlcustommodel/qml/qmlcustommodel/main.qml @@ -96,7 +96,6 @@ Rectangle { GroupedBarSeries { name: "Skoda and Volvo" - barCategories: [ "1", "2", "3", "4", "5", "6" ] HBarModelMapper { model: customModel firstBarSetRow: 4 diff --git a/demos/qmlweather/qml/qmlweather/main.qml b/demos/qmlweather/qml/qmlweather/main.qml index 212984f..28a20be 100644 --- a/demos/qmlweather/qml/qmlweather/main.qml +++ b/demos/qmlweather/qml/qmlweather/main.qml @@ -35,11 +35,10 @@ Rectangle { anchors.left: parent.left anchors.right: parent.right legend: ChartView.LegendTop + axisXLabels: ["0", "Mo", "1", "Tu", "2", "We", "3", "Th", "4", "Fr", "5", "Sa"] //![2] -// BarSeries { - GroupedBarSeries { - barCategories: [ "2008", "2009", "2010", "2011", "2012" ] + BarSeries { BarSet { id: rainfallSet name: "Rainfall" diff --git a/plugins/declarative/declarativebarseries.cpp b/plugins/declarative/declarativebarseries.cpp index ac994ae..8505be1 100644 --- a/plugins/declarative/declarativebarseries.cpp +++ b/plugins/declarative/declarativebarseries.cpp @@ -122,16 +122,6 @@ void DeclarativeBarSeries::appendSeriesChildren(QDeclarativeListProperty setList = barSets(); @@ -177,16 +167,6 @@ void DeclarativeGroupedBarSeries::appendSeriesChildren(QDeclarativeListProperty< Q_UNUSED(element); } -void DeclarativeGroupedBarSeries::setBarCategories(QStringList categories) -{ - setCategories(categories); -} - -QStringList DeclarativeGroupedBarSeries::barCategories() -{ - return categories(); -} - DeclarativeBarSet *DeclarativeGroupedBarSeries::at(int index) { QList setList = barSets(); diff --git a/plugins/declarative/declarativebarseries.h b/plugins/declarative/declarativebarseries.h index e3a038f..de08f18 100644 --- a/plugins/declarative/declarativebarseries.h +++ b/plugins/declarative/declarativebarseries.h @@ -61,17 +61,12 @@ class DeclarativeBarSeries : public QBarSeries, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QStringList barCategories READ barCategories WRITE setBarCategories) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") public: explicit DeclarativeBarSeries(QDeclarativeItem *parent = 0); QDeclarativeListProperty seriesChildren(); - - void setBarCategories(QStringList categories); - QStringList barCategories(); - Q_INVOKABLE DeclarativeBarSet *at(int index); public: // from QDeclarativeParserStatus @@ -86,17 +81,12 @@ class DeclarativeGroupedBarSeries : public QGroupedBarSeries, public QDeclarativ { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) - Q_PROPERTY(QStringList barCategories READ barCategories WRITE setBarCategories) Q_PROPERTY(QDeclarativeListProperty seriesChildren READ seriesChildren) Q_CLASSINFO("DefaultProperty", "seriesChildren") public: explicit DeclarativeGroupedBarSeries(QDeclarativeItem *parent = 0); QDeclarativeListProperty seriesChildren(); - - void setBarCategories(QStringList categories); - QStringList barCategories(); - Q_INVOKABLE DeclarativeBarSet *at(int index); public: // from QDeclarativeParserStatus diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml index 8d8435c..7eb8bb4 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml @@ -26,16 +26,14 @@ ChartView { anchors.fill: parent theme: ChartView.ChartThemeLight legend: ChartView.LegendBottom - // TODO: labels defined by x-axis, not by bar series - axisXLabels: ["0", "2008", "1", "2009", "2", "2010", "3", "2012"] + axisXLabels: ["0", "2007", "1", "2008", "2", "2009", "3", "2010", "4", "2011", "5", "2012"] property variant series: daSeries BarSeries { id: daSeries - barCategories: [ "2008", "2009", "2010", "2011", "2012" ] - BarSet { name: "Bob"; values: [2, 2, 3, 4, 5, 6] } - BarSet { name: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { name: "James"; values: [3, 5, 8, 13, 5, 8] } + BarSet { name: "Bob"; values: [4, 7, 3, 10, 5, 6] } + BarSet { name: "Susan"; values: [5, 1, 2, 4, 1, 8] } + BarSet { name: "James"; values: [3, 5, 8, 5, 4, 7] } } } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/GroupedBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/GroupedBarChart.qml index d81e395..9f6e70c 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/GroupedBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/GroupedBarChart.qml @@ -26,14 +26,12 @@ ChartView { anchors.fill: parent theme: ChartView.ChartThemeLight legend: ChartView.LegendBottom - // TODO: labels defined by x-axis, not by bar series - axisXLabels: ["0", "2008", "1", "2009", "2", "2010", "3", "2012"] + axisXLabels: ["0", "2007", "1", "2008", "2", "2009", "3", "2010", "4", "2011", "5", "2012"] property variant series: daSeries GroupedBarSeries { id: daSeries - barCategories: [ "2008", "2009", "2010", "2011", "2012" ] BarSet { name: "Bob"; values: [2, 2, 3, 4, 5, 6] } BarSet { name: "Susan"; values: [5, 1, 2, 4, 1, 7] } BarSet { name: "James"; values: [3, 5, 8, 13, 5, 8] } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml index 58f580d..6e4f669 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml @@ -26,8 +26,7 @@ ChartView { anchors.fill: parent theme: ChartView.ChartThemeLight legend: ChartView.LegendBottom - // TODO: labels defined by x-axis, not by bar series - axisXLabels: ["0", "2008", "1", "2009", "2", "2010", "3", "2012"] + axisXLabels: ["0", "2007", "1", "2008", "2", "2009", "3", "2010", "4", "2011", "5", "2012"] property variant series: daSeries diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml index 8a98fef..2a67015 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml @@ -26,7 +26,7 @@ ChartView { anchors.fill: parent theme: ChartView.ChartThemeLight legend: ChartView.LegendBottom - axisXLabels: ["0", "2008", "1", "2009", "2", "2010", "3", "2012"] + axisXLabels: ["0", "2007", "1", "2008", "2", "2009", "3", "2010", "4", "2011", "5", "2012"] property variant series: daSeries