Fix docs for itemLabelFormat

Pick-to: 6.8.1
Task-number: QTBUG-131131
Change-Id: I6f4385a0502d38e03c05550117883d913c418121
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
(cherry picked from commit 16c9c1ebf5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tomi Korpipaa 2024-11-15 08:42:06 +02:00 committed by Qt Cherry-pick Bot
parent d634166b15
commit 839d5e5633
5 changed files with 92 additions and 10 deletions

View File

@ -5,6 +5,10 @@
proxy->setItemLabelFormat(QStringLiteral("@valueTitle for (@rowLabel, @colLabel): %.1f"));
//! [labelformat]
//! [labelformat-scatter]
proxy->setItemLabelFormat(QStringLiteral("@yTitle for (@xLabel, @zLabel): %.1f"));
//! [labelformat-scatter]
//! [barmodelproxy]
// By defining row and column categories, you tell the mapping which row and column each item
// belongs to. The categories must match the data stored in the model in the roles you define

View File

@ -103,8 +103,9 @@ QT_BEGIN_NAMESPACE
*
* The label format for data items in this series. This format is used for
* single item labels, for example, when an item is selected. How the format is
* interpreted depends on series type: Bar3DSeries, Scatter3DSeries,
* Surface3DSeries.
* interpreted depends on series type.
*
* \sa Bar3DSeries, Scatter3DSeries, Surface3DSeries.
*/
/*!
@ -363,7 +364,9 @@ QAbstract3DSeries::SeriesType QAbstract3DSeries::type() const
*
* This format is used for single item labels,
* for example, when an item is selected. How the format is interpreted depends
* on series type: QBar3DSeries, QScatter3DSeries, QSurface3DSeries.
* on series type.
*
* \sa QBar3DSeries, QScatter3DSeries, QSurface3DSeries.
*/
void QAbstract3DSeries::setItemLabelFormat(const QString &format)
{

View File

@ -74,6 +74,33 @@ QT_BEGIN_NAMESPACE
* This type manages the series specific visual elements, as well as the series
* data (via a data proxy).
*
* Bar3DSeries supports the following format tags for itemLabelFormat:
* \table
* \row
* \li @rowTitle \li Title from row axis
* \row
* \li @colTitle \li Title from column axis
* \row
* \li @valueTitle \li Title from value axis
* \row
* \li @rowIdx \li Visible row index. Localized using the graph locale.
* \row
* \li @colIdx \li Visible column index. Localized using the graph locale.
* \row
* \li @rowLabel \li Label from row axis
* \row
* \li @colLabel \li Label from column axis
* \row
* \li @valueLabel \li Item value formatted using the format of the value
* axis attached to the graph. For more information,
* see \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @seriesName \li Name of the series
* \row
* \li %<format spec> \li Item value in the specified format. Formatted
* using the same rules as \l{QValue3DAxis::labelFormat}{labelFormat}.
* \endtable
*
* For a more complete description, see QBar3DSeries.
*
* \sa {Qt Graphs Data Handling with 3D}

View File

@ -40,21 +40,21 @@ QT_BEGIN_NAMESPACE
* \row
* \li @xLabel \li Item value formatted using the format of the x-axis.
* For more information, see
* \l{QValue3DAxis::setLabelFormat()}.
* \l{QValue3DAxis::labelFormat}.
* \row
* \li @yLabel \li Item value formatted using the format of the y-axis.
* For more information, see
* \l{QValue3DAxis::setLabelFormat()}.
* \l{QValue3DAxis::labelFormat}.
* \row
* \li @zLabel \li Item value formatted using the format of the z-axis.
* For more information, see
* \l{QValue3DAxis::setLabelFormat()}.
* \l{QValue3DAxis::labelFormat}.
* \row
* \li @seriesName \li Name of the series
* \endtable
*
* For example:
* \snippet doc_src_qtgraphs.cpp labelformat
* \snippet doc_src_qtgraphs.cpp labelformat-scatter
*
* \sa {Qt Graphs Data Handling with 3D}
*/
@ -70,6 +70,30 @@ QT_BEGIN_NAMESPACE
* This type manages the series specific visual elements, as well as the series
* data (via a data proxy).
*
* Scatter3DSeries supports the following format tags for itemLabelFormat:
* \table
* \row
* \li @xTitle \li Title from x-axis
* \row
* \li @yTitle \li Title from y-axis
* \row
* \li @zTitle \li Title from z-axis
* \row
* \li @xLabel \li Item value formatted using the format of the x-axis.
* For more information, see
* \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @yLabel \li Item value formatted using the format of the y-axis.
* For more information, see
* \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @zLabel \li Item value formatted using the format of the z-axis.
* For more information, see
* \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @seriesName \li Name of the series
* \endtable
*
* For a more complete description, see QScatter3DSeries.
*
* \sa {Qt Graphs Data Handling with 3D}

View File

@ -43,15 +43,15 @@ QT_BEGIN_NAMESPACE
* \row
* \li @xLabel \li Item value formatted using the format of the x-axis.
* For more information, see
* \l{QValue3DAxis::setLabelFormat()}.
* \l{QValue3DAxis::labelFormat}.
* \row
* \li @yLabel \li Item value formatted using the format of the y-axis.
* For more information, see
* \l{QValue3DAxis::setLabelFormat()}.
* \l{QValue3DAxis::labelFormat}.
* \row
* \li @zLabel \li Item value formatted using the format of the z-axis.
* For more information, see
* \l{QValue3DAxis::setLabelFormat()}.
* \l{QValue3DAxis::labelFormat}.
* \row
* \li @seriesName \li Name of the series
* \endtable
@ -73,6 +73,30 @@ QT_BEGIN_NAMESPACE
* This type manages the series specific visual elements, as well as the series
* data (via a data proxy).
*
* Surface3DSeries supports the following format tags for itemLabelFormat:
* \table
* \row
* \li @xTitle \li Title from x-axis
* \row
* \li @yTitle \li Title from y-axis
* \row
* \li @zTitle \li Title from z-axis
* \row
* \li @xLabel \li Item value formatted using the format of the x-axis.
* For more information, see
* \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @yLabel \li Item value formatted using the format of the y-axis.
* For more information, see
* \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @zLabel \li Item value formatted using the format of the z-axis.
* For more information, see
* \l{QValue3DAxis::labelFormat}{labelFormat}.
* \row
* \li @seriesName \li Name of the series
* \endtable
*
* For a more complete description, see QSurface3DSeries.
*
* \sa {Qt Graphs Data Handling with 3D}