mirror of https://github.com/qt/qtgraphs.git
Check for existing labels in baritemmodelhandler
Also add setting column and row labels in tst_qmltheme. Fixes: QTBUG-130722 Pick-to: 6.8 Change-Id: I09cc382957cb3d9ccca0b72ae3723978157726ac Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
This commit is contained in:
parent
a56b3ca05c
commit
3199d40a3d
|
|
@ -270,8 +270,15 @@ void BarItemModelHandler::resolveModel()
|
|||
}
|
||||
}
|
||||
|
||||
rowLabels = rowList;
|
||||
columnLabels = columnList;
|
||||
if (!m_proxy->series()->rowLabels().isEmpty())
|
||||
rowLabels = m_proxy->series()->rowLabels();
|
||||
else
|
||||
rowLabels = rowList;
|
||||
if (!m_proxy->series()->columnLabels().isEmpty())
|
||||
columnLabels = m_proxy->series()->columnLabels();
|
||||
else
|
||||
columnLabels = columnList;
|
||||
|
||||
m_columnCount = columnList.size();
|
||||
|
||||
delete matchCountMap;
|
||||
|
|
|
|||
|
|
@ -124,6 +124,23 @@ Item {
|
|||
// If you want to check with series colors, uncomment these
|
||||
// baseGradient: customGradient
|
||||
// baseColor: barColor.color
|
||||
columnLabels: [
|
||||
"col 1",
|
||||
"col 2",
|
||||
"col 3",
|
||||
"col 4",
|
||||
"col 5",
|
||||
"col 6",
|
||||
]
|
||||
rowLabels: [
|
||||
"row 1",
|
||||
"row 2",
|
||||
"row 3",
|
||||
"row 4",
|
||||
"row 5",
|
||||
"row 6",
|
||||
]
|
||||
|
||||
ItemModelBarDataProxy {
|
||||
id: barProxy
|
||||
itemModel: ListModel {
|
||||
|
|
|
|||
Loading…
Reference in New Issue