diff --git a/doc/src/examples-barmodelmapper.qdoc b/doc/src/examples-barmodelmapper.qdoc index 046a1b0..f343627 100644 --- a/doc/src/examples-barmodelmapper.qdoc +++ b/doc/src/examples-barmodelmapper.qdoc @@ -25,14 +25,14 @@ First line of the code below creates new grouped bar series. Variables firstRow and rowCount are used to define a custom model mapping. Custom mapping allows to take only part of the data from the model. In this case data from 5 rows starting with the row with the index 3. - Following three lines create an instance of QVBarModelMapper class and specifie that data for the bar sets should be taken from the model's columns(Qt::Vertical) with indexes from 1 to 4(inclusive). + Following three lines create an instance of QVBarModelMapper class and specifie that data for the bar sets should be taken from the model's columns with indexes from 1 to 4(inclusive). To create a connection between the series and the model we set both of those objects to QVBarModelMapper. Finally the series is added to the chart. \snippet ../examples/barmodelmapper/tablewidget.cpp 4 - To show in QTableView which data coresponds with which series this example uses table coloring. + To show in QTableView which data coresponds with which bar set this example uses table coloring. When series is added to the chart it is assigned a color beased on the currently selected theme. Code below extracts that color from the series and uses it to create colored QTableView. Coloring of the view is not a part of the QChart functionality. diff --git a/examples/barmodelmapper/tablewidget.cpp b/examples/barmodelmapper/tablewidget.cpp index 8f35c9f..89f457b 100644 --- a/examples/barmodelmapper/tablewidget.cpp +++ b/examples/barmodelmapper/tablewidget.cpp @@ -65,7 +65,7 @@ TableWidget::TableWidget(QWidget *parent) QVBarModelMapper *mapper = new QVBarModelMapper(this); mapper->setFirstBarSetColumn(1); mapper->setLastBarSetColumn(4); - mapper->setFirst(3); + mapper->setFirst(first); mapper->setCount(count); mapper->setSeries(series); mapper->setModel(model);