diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-21 08:55:03 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-21 09:41:47 +0200 |
commit | 177f9d385c8cd062c4bad78cf6b794a96fa025ad (patch) | |
tree | 14b362622d07a93ea56b077e23894a7384a3ddaa /examples/itemmodel | |
parent | 818e29d4c4fd4344df20328ec3fe693acc67e11a (diff) |
Selection correction for scatter when data changes
Implements item 3) in QTRD-2645
Task-number: QTRD-264
Change-Id: Ibe758bbfb3b4a74b55589a410b402bbdf07ea64f
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/itemmodel')
-rw-r--r-- | examples/itemmodel/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/itemmodel/main.cpp b/examples/itemmodel/main.cpp index 46824993..bdecd1a5 100644 --- a/examples/itemmodel/main.cpp +++ b/examples/itemmodel/main.cpp @@ -84,17 +84,18 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid #ifndef USE_STATIC_DATA // Set up sample space; make it as deep as it's wide - m_graph->setDataWindow(m_rowCount, m_columnCount); + m_graph->rowAxis()->setRange(0, m_rowCount); + m_graph->columnAxis()->setRange(0, m_columnCount); m_tableWidget->setColumnCount(m_columnCount); // Set selection mode to full m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemRowAndColumn); // Hide axis labels by explicitly setting one empty string as label list - m_graph->rowAxis()->setCategoryLabels(QStringList(QString())); - m_graph->columnAxis()->setCategoryLabels(QStringList(QString())); + m_graph->rowAxis()->setLabels(QStringList(QString())); + m_graph->columnAxis()->setLabels(QStringList(QString())); - m_graph->activeDataProxy()->setItemLabelFormat(QStringLiteral("@valueLabel")); + m_graph->seriesList().at(0)->setItemLabelFormat(QStringLiteral("@valueLabel")); #else //! [6] |