diff options
author | Topi Reinio <topi.reinio@qt.io> | 2019-02-28 14:42:03 +0100 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2019-03-05 10:56:41 +0000 |
commit | 203508d4aff39cfb7d8a7f3192884a190f203020 (patch) | |
tree | 07f2700bcd3656da87c71d1474f21acfa8e82166 /src/charts/doc/src | |
parent | de84efac79724970bcdeac7fcdfe72a5fa846761 (diff) |
Doc: Set QChart functions as deprecated
axisX,Y and setAxisX,Y functions are now deprecated - mark them
as such in the documentation. Example code was also fixed to
not use deprecated functions, but example documentation was
not updated to reflect that change.
Task-number: QTBUG-74097
Change-Id: I2d4f283f1d0c62a02b33c373885e75bce34a1114
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/charts/doc/src')
7 files changed, 36 insertions, 29 deletions
diff --git a/src/charts/doc/src/examples-barchart.qdoc b/src/charts/doc/src/examples-barchart.qdoc index 412cdca6..818adcd1 100644 --- a/src/charts/doc/src/examples-barchart.qdoc +++ b/src/charts/doc/src/examples-barchart.qdoc @@ -57,10 +57,11 @@ \snippet barchart/main.cpp 3 - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. Here we create a category axis with a list of categories and - set it to be the x-axis of the chart. The chart takes ownership of axis. For y-axis we use default axis, which is created and scaled to series data - by calling createDefaultAxes of the chart. Note that the call for createDefaultAxes must be before we set the category axis. Otherwise the default axis will - override the category axis. + To have categories displayed on axis, we need to create a QBarCategoryAxis + for that. Here we create a category axis with a list of categories and + set it to be aligned to the bottom, acting as the x-axis, and attach it to + the series. The chart takes ownership of the axis. For y-axis we use a + value axis, aligned to the left-hand side. \snippet barchart/main.cpp 4 diff --git a/src/charts/doc/src/examples-horizontalbarchart.qdoc b/src/charts/doc/src/examples-horizontalbarchart.qdoc index 84b0f678..9b66cc5d 100644 --- a/src/charts/doc/src/examples-horizontalbarchart.qdoc +++ b/src/charts/doc/src/examples-horizontalbarchart.qdoc @@ -58,10 +58,11 @@ \snippet horizontalbarchart/main.cpp 3 - To have the categories displayed on axis, we need to create a QBarCategoryAxis. Here we create a category axis with a list of categories and - set it to be the y-axis of the chart. The chart takes ownership of axis. For the x-axis we use the default axis, which is created and scaled to series data - by calling createDefaultAxes of the chart. Note that the call for createDefaultAxes must be done before we set the category axis. Otherwise the default axis will - override the category axis. + To have categories displayed on axis, we need to create a QBarCategoryAxis + for that. Here we create a category axis with a list of categories and + set it to be aligned to the left-hand side, acting as the y-axis, and + attach it to the series. The chart takes ownership of the axis. For x-axis + we use a value axis, aligned to the bottom. \snippet horizontalbarchart/main.cpp 4 diff --git a/src/charts/doc/src/examples-horizontalpercentbarchart.qdoc b/src/charts/doc/src/examples-horizontalpercentbarchart.qdoc index 59fba601..4ab67e99 100644 --- a/src/charts/doc/src/examples-horizontalpercentbarchart.qdoc +++ b/src/charts/doc/src/examples-horizontalpercentbarchart.qdoc @@ -63,10 +63,11 @@ \snippet horizontalpercentbarchart/main.cpp 3 - To have the categories displayed on an axis, we need to create a QBarCategoryAxis first. Here we create a category axis with a list of categories and - set it to be the y-axis of the chart. The chart takes ownership of the axis. For the x-axis we use the default axis, which is created and scaled to series data - by calling createDefaultAxes of the chart. Note that createDefaultAxes must be called before we set the category axis. Otherwise the default axis will - override the category axis. + To have the categories displayed on an axis, we need to create a + QBarCategoryAxis first. Here we create a category axis with a list of + categories and add it to the chart on the left-hand side, acting as the + y-axis. The chart takes ownership of the axis. For x-axis we use a value + axis, aligned to the bottom. \snippet horizontalpercentbarchart/main.cpp 4 diff --git a/src/charts/doc/src/examples-horizontalstackedbarchart.qdoc b/src/charts/doc/src/examples-horizontalstackedbarchart.qdoc index 4adf8ae2..de46004a 100644 --- a/src/charts/doc/src/examples-horizontalstackedbarchart.qdoc +++ b/src/charts/doc/src/examples-horizontalstackedbarchart.qdoc @@ -60,10 +60,11 @@ \snippet horizontalstackedbarchart/main.cpp 3 - To have categories displayed on an axis, we need to create a QBarCategoryAxis. Here we create a category axis with a list of categories and - set it to be the y-axis of the chart. The chart takes ownership of the axis. For the x-axis we use the default axis, which is created and scaled to series data - by calling createDefaultAxes of the chart. Note that the call for createDefaultAxes must be before we set the category axis. Otherwise the default axis will - override the category axis. + To have the categories displayed on an axis, we need to create a + QBarCategoryAxis first. Here we create a category axis with a list of + categories and add it to the chart on the left-hand side, acting as the + y-axis. The chart takes ownership of the axis. For x-axis we use a value + axis, aligned to the bottom. \snippet horizontalstackedbarchart/main.cpp 4 diff --git a/src/charts/doc/src/examples-percentbarchart.qdoc b/src/charts/doc/src/examples-percentbarchart.qdoc index 2c0d2a5e..813fde1b 100644 --- a/src/charts/doc/src/examples-percentbarchart.qdoc +++ b/src/charts/doc/src/examples-percentbarchart.qdoc @@ -63,10 +63,11 @@ \snippet percentbarchart/main.cpp 3 - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. Here we create a category axis with a list of categories and - set it to be the x-axis of the chart. The chart takes ownership of the axis. For the y-axis we use the default axis, which is created and scaled - to series data by calling createDefaultAxes of the chart. Note that createDefaultAxes must be called before we set the category axis. - Otherwise the default axis will override the category axis. + To have the categories displayed on an axis, we need to create a + QBarCategoryAxis first. Here we create a category axis with a list of + categories and add it to the chart aligned to the bottom, acting as the + x-axis. The chart takes ownership of the axis. For y-axis we use a value + axis, aligned to the left-hand side. \snippet percentbarchart/main.cpp 4 diff --git a/src/charts/doc/src/examples-stackedbarchart.qdoc b/src/charts/doc/src/examples-stackedbarchart.qdoc index 1744a68a..367a11ab 100644 --- a/src/charts/doc/src/examples-stackedbarchart.qdoc +++ b/src/charts/doc/src/examples-stackedbarchart.qdoc @@ -62,10 +62,11 @@ \snippet stackedbarchart/main.cpp 3 - To have categories displayed on the axis, we need to create a QBarCategoryAxis. Here we create a category axis with list of categories and - set it to be the x-axis of the chart. The chart takes ownership of the axis. For the y-axis we use default axis, which is created and scaled to series data - by calling createDefaultAxes of the chart. Note that the call for createDefaultAxes must be before we set the category axis. Otherwise the default axis will - override the category axis. + To have the categories displayed on an axis, we need to create a + QBarCategoryAxis first. Here we create a category axis with a list of + categories and add it to the chart aligned to bottom, acting as the + x-axis. The chart takes ownership of the axis. For the y-axis we use a + value axis, aligned to the left-hand side. \snippet stackedbarchart/main.cpp 4 diff --git a/src/charts/doc/src/examples-temperaturerecords.qdoc b/src/charts/doc/src/examples-temperaturerecords.qdoc index bf8a0b8c..8ac9d9a1 100644 --- a/src/charts/doc/src/examples-temperaturerecords.qdoc +++ b/src/charts/doc/src/examples-temperaturerecords.qdoc @@ -53,11 +53,12 @@ \snippet temperaturerecords/main.cpp 3 - To have categories displayed on an axis, we need to create a QBarCategoryAxis. Here we create a category axis with a list of categories and - set it to be the x-axis of the chart. The chart takes ownership of the axis. For y-axis we use the default axis, which is created and scaled to the series data - by calling createDefaultAxes of the chart. We change the range for the y-axis, since this gives nicer result than with autoscaling. - - Note that the call for createDefaultAxes must be before we set the category axis. Otherwise the default axis will override the category axis. + To have the categories displayed on an axis, we need to create a + QBarCategoryAxis. Here we create a category axis with a list of + categories and add it to the chart aligned to bottom, acting as the + x-axis. The chart takes ownership of the axis. For y-axis we use a value + axis, aligned to the left-hand side. We change the range for the y-axis, + as this gives nicer results than with autoscaling. \snippet temperaturerecords/main.cpp 4 |