diff --git a/src/charts/axis/categoryaxis/qcategoryaxis.cpp b/src/charts/axis/categoryaxis/qcategoryaxis.cpp index 5e04893..10d2719 100644 --- a/src/charts/axis/categoryaxis/qcategoryaxis.cpp +++ b/src/charts/axis/categoryaxis/qcategoryaxis.cpp @@ -37,28 +37,22 @@ QT_CHARTS_BEGIN_NAMESPACE Unlike with the QBarCategoryAxis the QCategoryAxis allows the categories ranges widths to be specified freely. Example code on how to use QCategoryAxis: - \table - \row - \li \br - \br - \code - QChartView *chartView = new QChartView; - QLineSeries *series = new QLineSeries; - // ... - chartView->chart()->addSeries(series); - - QCategoryAxis *axisY = new QCategoryAxis; - axisY->setMin(0); - axisY->setMax(52); - axisY->setStartValue(15); - axisY->append("First", 20); - axisY->append("Second", 37); - axisY->append("Third", 52); - chartView->chart()->setAxisY(axisY, series); - \endcode - \li \br - \inlineimage api_category_axis.png - \endtable + \image api_category_axis.png + \code + QChartView *chartView = new QChartView; + QLineSeries *series = new QLineSeries; + // ... + chartView->chart()->addSeries(series); + + QCategoryAxis *axisY = new QCategoryAxis; + axisY->setMin(0); + axisY->setMax(52); + axisY->setStartValue(15); + axisY->append("First", 20); + axisY->append("Second", 37); + axisY->append("Third", 52); + chartView->chart()->setAxisY(axisY, series); + \endcode */ /*! \qmltype CategoryAxis @@ -69,14 +63,8 @@ QT_CHARTS_BEGIN_NAMESPACE \brief CategoryAxis allows putting a named ranges on the axis. For example: - \table - \row - \li \br - \br - \br - \snippet qmlaxes/qml/qmlaxes/View3.qml 1 - \li \inlineimage examples_qmlaxes3.png - \endtable + \image examples_qmlaxes3.png + \snippet qmlaxes/qml/qmlaxes/View3.qml 1 */ /*! diff --git a/src/charts/doc/src/examples-audio.qdoc b/src/charts/doc/src/examples-audio.qdoc index 8620a9e..2ac6ec8 100644 --- a/src/charts/doc/src/examples-audio.qdoc +++ b/src/charts/doc/src/examples-audio.qdoc @@ -18,7 +18,7 @@ /*! \example audio - \title Audio example + \title Audio Example \ingroup qtcharts_examples \brief This example shows the drawing of dynamic data (microphone input). diff --git a/src/charts/doc/src/examples-barmodelmapper.qdoc b/src/charts/doc/src/examples-barmodelmapper.qdoc index e3c6b3e..fe2e8dd 100644 --- a/src/charts/doc/src/examples-barmodelmapper.qdoc +++ b/src/charts/doc/src/examples-barmodelmapper.qdoc @@ -18,7 +18,7 @@ /*! \example barmodelmapper - \title BarModelMapper example + \title BarModelMapper Example \ingroup qtcharts_examples \brief This example shows how to use QAbstractItemModel derived model as the data for the bar diff --git a/src/charts/doc/src/examples-callout.qdoc b/src/charts/doc/src/examples-callout.qdoc index d4adede..4e41da6 100644 --- a/src/charts/doc/src/examples-callout.qdoc +++ b/src/charts/doc/src/examples-callout.qdoc @@ -18,7 +18,7 @@ /*! \example callout - \title Callout example + \title Callout Example \ingroup qtcharts_examples \brief This example shows how to draw an additional element (a callout) on top of the chart. diff --git a/src/charts/doc/src/examples-chartthemes.qdoc b/src/charts/doc/src/examples-chartthemes.qdoc index 25c2ef6..384056f 100644 --- a/src/charts/doc/src/examples-chartthemes.qdoc +++ b/src/charts/doc/src/examples-chartthemes.qdoc @@ -18,7 +18,7 @@ /*! \example chartthemes - \title Chart themes example + \title Chart Themes Example \ingroup qtcharts_examples \brief The example shows the look and feel of the different built-in themes. diff --git a/src/charts/doc/src/examples-donutbreakdown.qdoc b/src/charts/doc/src/examples-donutbreakdown.qdoc index bf14c5d..a571a9f 100644 --- a/src/charts/doc/src/examples-donutbreakdown.qdoc +++ b/src/charts/doc/src/examples-donutbreakdown.qdoc @@ -18,7 +18,7 @@ /*! \example donutbreakdown - \title Donut chart breakdown example + \title Donut Chart Breakdown Example \ingroup qtcharts_examples \brief This example shows how to use create a donut breakdown chart using QPieSeries API. diff --git a/src/charts/doc/src/examples-dynamicspline.qdoc b/src/charts/doc/src/examples-dynamicspline.qdoc index 7795ffc..8ad399f 100644 --- a/src/charts/doc/src/examples-dynamicspline.qdoc +++ b/src/charts/doc/src/examples-dynamicspline.qdoc @@ -18,7 +18,7 @@ /*! \example dynamicspline - \title Dynamic spline example + \title Dynamic Spline Example \ingroup qtcharts_examples \brief This example shows how to draw dynamic data. diff --git a/src/charts/doc/src/examples-legend.qdoc b/src/charts/doc/src/examples-legend.qdoc index 238fb8d..b3e8bec 100644 --- a/src/charts/doc/src/examples-legend.qdoc +++ b/src/charts/doc/src/examples-legend.qdoc @@ -34,11 +34,8 @@ alignment can be modified. When the legend is detached, it can be resized and positioned freely. - \table - \row - \li \inlineimage examples_legend_detach.png - \li \inlineimage examples_legend_detach2.png - \endtable + \image examples_legend_detach.png + \image examples_legend_detach2.png Here we turn the legend visible and set its alignment to the bottom of the chart. diff --git a/src/charts/doc/src/examples-nesteddonuts.qdoc b/src/charts/doc/src/examples-nesteddonuts.qdoc index 0b1e1ce..96d128a 100644 --- a/src/charts/doc/src/examples-nesteddonuts.qdoc +++ b/src/charts/doc/src/examples-nesteddonuts.qdoc @@ -18,7 +18,7 @@ /*! \example nesteddonuts - \title Nested donuts example + \title Nested Donuts Example \ingroup qtcharts_examples \brief This example shows how to create a nested donuts chart using the QPieSeries API. diff --git a/src/charts/doc/src/examples-piechartcustomization.qdoc b/src/charts/doc/src/examples-piechartcustomization.qdoc index 488bb8e..dab4007 100644 --- a/src/charts/doc/src/examples-piechartcustomization.qdoc +++ b/src/charts/doc/src/examples-piechartcustomization.qdoc @@ -18,7 +18,7 @@ /*! \example piechartcustomization - \title Pie chart customization example + \title Pie Chart Customization Example \ingroup qtcharts_examples \brief This example shows how the look and feel of a pie chart can be customized. diff --git a/src/charts/doc/src/examples-qmlaxes.qdoc b/src/charts/doc/src/examples-qmlaxes.qdoc index 47e6947..4e35f9e 100644 --- a/src/charts/doc/src/examples-qmlaxes.qdoc +++ b/src/charts/doc/src/examples-qmlaxes.qdoc @@ -23,28 +23,19 @@ \brief This is a demonstration of how to use axes in your QML application. - \table - \row - \li \br - We begin with a chart that has a line series and a scatter series with random - data. Both series use the same axes. - \br - \br - \snippet qmlaxes/qml/qmlaxes/View1.qml 1 - \li \inlineimage examples_qmlaxes1.png - \row - \li \br - The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis. - \br - \br - \snippet qmlaxes/qml/qmlaxes/View2.qml 1 - \li \inlineimage examples_qmlaxes2.png - \row - \li \br - And the final example with a chart that uses a CategoryAxis to make the data easier to understand. - \br - \br - \snippet qmlaxes/qml/qmlaxes/View3.qml 1 - \li \inlineimage examples_qmlaxes3.png - \endtable + We begin with a chart that has a line series and a scatter series with random + data. Both series use the same axes. + + \image examples_qmlaxes1.png + \snippet qmlaxes/qml/qmlaxes/View1.qml 1 + + The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis. + + \image examples_qmlaxes2.png + \snippet qmlaxes/qml/qmlaxes/View2.qml 1 + + And the final example with a chart that uses a CategoryAxis to make the data easier to understand. + + \image examples_qmlaxes3.png + \snippet qmlaxes/qml/qmlaxes/View3.qml 1 */ diff --git a/src/charts/doc/src/examples-qmlchart.qdoc b/src/charts/doc/src/examples-qmlchart.qdoc index 7236e24..5af5fc6 100644 --- a/src/charts/doc/src/examples-qmlchart.qdoc +++ b/src/charts/doc/src/examples-qmlchart.qdoc @@ -18,126 +18,65 @@ /*! \example qmlchart - \title Qml charts example + \title Qml Charts Example \ingroup qtcharts_examples \brief This basic demonstration shows how to use the different chart types by using qml. Creating each chart type begins with the creation of a ChartView. - \table - \row - \li \br - To create a pie, we use the PieSeries API together with a few PieSlices: - \br - \br - \snippet qmlchart/qml/qmlchart/View1.qml 1 - \li \inlineimage examples_qmlchart1.png - \endtable - - \table - \row - \li \br - To create a chart with a line series: - \br - \br - \snippet qmlchart/qml/qmlchart/View2.qml 1 - \li \inlineimage examples_qmlchart2.png - \endtable - - \table - \row - \li \br - And spline series: - \br - \br - \snippet qmlchart/qml/qmlchart/View3.qml 1 - \li \inlineimage examples_qmlchart3.png - \endtable - - \table - \row - \li \br - Then we create a chart that illustrates the NHL All-Star player selections by using - three area series: - \br - \br - \snippet qmlchart/qml/qmlchart/View4.qml 1 - \dots - \li \inlineimage examples_qmlchart4.png - \endtable - - \table - \row - \li \br - Then a couple of scatter series: - \br - \br - \snippet qmlchart/qml/qmlchart/View5.qml 1 - \dots - \li \inlineimage examples_qmlchart5.png - \endtable + To create a pie, we use the PieSeries API together with a few PieSlices: + + \image examples_qmlchart1.png + \snippet qmlchart/qml/qmlchart/View1.qml 1 + + To create a chart with a line series: + + \image examples_qmlchart2.png + \snippet qmlchart/qml/qmlchart/View2.qml 1 + + And spline series: + + \image examples_qmlchart3.png + \snippet qmlchart/qml/qmlchart/View3.qml 1 + + Then we create a chart that illustrates the NHL All-Star player selections by using + three area series: + + \image examples_qmlchart4.png + \snippet qmlchart/qml/qmlchart/View4.qml 1 + \dots + + Then a couple of scatter series: + + \image examples_qmlchart5.png + \snippet qmlchart/qml/qmlchart/View5.qml 1 + \dots And a few different bar series: - \table - \row - \li \br - \br - \br - \snippet qmlchart/qml/qmlchart/View6.qml 1 - \li \inlineimage examples_qmlchart6.png - \endtable - \table - \row - \li \br - \br - \br - \snippet qmlchart/qml/qmlchart/View7.qml 1 - \li \inlineimage examples_qmlchart7.png - \endtable - \table - \row - \li \br - \br - \br - \snippet qmlchart/qml/qmlchart/View8.qml 1 - \li \inlineimage examples_qmlchart8.png - \endtable - \table - \row - \li \br - \br - \br - \snippet qmlchart/qml/qmlchart/View9.qml 1 - \li \inlineimage examples_qmlchart9.png - \endtable - \table - \row - \li \br - \br - \br - \snippet qmlchart/qml/qmlchart/View10.qml 1 - \li \inlineimage examples_qmlchart10.png - \endtable - \table - \row - \li \br - \br - \br - \snippet qmlchart/qml/qmlchart/View11.qml 1 - \li \inlineimage examples_qmlchart11.png - \endtable - - \table - \row - \li \br - And finally an example demonstrating how to create a donut chart with two pie - series: - \br - \br - \snippet qmlchart/qml/qmlchart/View12.qml 1 - \li \inlineimage examples_qmlchart12.png - \endtable + + \image examples_qmlchart6.png + \snippet qmlchart/qml/qmlchart/View6.qml 1 + + \image examples_qmlchart7.png + \snippet qmlchart/qml/qmlchart/View7.qml 1 + + \image examples_qmlchart8.png + \snippet qmlchart/qml/qmlchart/View8.qml 1 + + \image examples_qmlchart9.png + \snippet qmlchart/qml/qmlchart/View9.qml 1 + + \image examples_qmlchart10.png + \snippet qmlchart/qml/qmlchart/View10.qml 1 + + \image examples_qmlchart11.png + \snippet qmlchart/qml/qmlchart/View11.qml 1 + + And finally an example demonstrating how to create a donut chart with two pie series: + + \image examples_qmlchart12.png + \snippet qmlchart/qml/qmlchart/View12.qml 1 Additionally, antialiasing is set with the qml property in Qt Quick 2. */ diff --git a/src/charts/doc/src/examples-qmlcustomlegend.qdoc b/src/charts/doc/src/examples-qmlcustomlegend.qdoc index d2b2498..df19e24 100644 --- a/src/charts/doc/src/examples-qmlcustomlegend.qdoc +++ b/src/charts/doc/src/examples-qmlcustomlegend.qdoc @@ -26,36 +26,24 @@ This application shows you how to create your own custom legend instead of using the built-in legend of ChartView API. - \table - \row - \li \br - The main view of the application shows a stacked area chart. This is how one of - \br - the stacked areas is created. See ChartViewStacked.qml and AnimatedAreaSeries.qml. - \br - \br - \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewStacked.qml 1 - \li \inlineimage examples_qmlcustomlegend1.png - \row - \li \br - Hovering with mouse on top of the legend will highlight the hovered series. - \br - (see CustomLegend.qml). - \br - \br - \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 1 - \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 2 - \dots - \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 3 - \li \inlineimage examples_qmlcustomlegend2.png - \row - \li \br - You can also select one of the stacked areas for a closer look as a line series by - \br - a mouse click (see ChartViewHighlighted.qml). - \br - \br - \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml 1 - \li \inlineimage examples_qmlcustomlegend3.png - \endtable + The main view of the application shows a stacked area chart. This is how one of + the stacked areas is created. See ChartViewStacked.qml and AnimatedAreaSeries.qml. + + \image examples_qmlcustomlegend1.png + \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewStacked.qml 1 + + Hovering with mouse on top of the legend will highlight the hovered series. + (see CustomLegend.qml). + + \image examples_qmlcustomlegend2.png + \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 1 + \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 2 + \dots + \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 3 + + You can also select one of the stacked areas for a closer look as a line series by + a mouse click (see ChartViewHighlighted.qml). + + \image examples_qmlcustomlegend3.png + \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml 1 */ diff --git a/src/charts/doc/src/examples-qmlpolarchart.qdoc b/src/charts/doc/src/examples-qmlpolarchart.qdoc index bc03033..3930a8e 100644 --- a/src/charts/doc/src/examples-qmlpolarchart.qdoc +++ b/src/charts/doc/src/examples-qmlpolarchart.qdoc @@ -23,31 +23,21 @@ \brief This is a demonstration on how to use a polar chart in your QML application. - \table - \row - \li \br - We begin with a chart that has a spline series and a scatter series with random - data. Both series use the same axes. - \br - \br - \snippet qmlpolarchart/qml/qmlpolarchart/View1.qml 1 - \li \inlineimage examples_qmlpolarchart1.png - \row - \li \br - The next example shows a chart with some accurate historical data for which we need - to use a DateTimeAxis - and a AreaSeries. - \br - \br - \snippet qmlpolarchart/qml/qmlpolarchart/View2.qml 1 - \li \inlineimage examples_qmlpolarchart2.png - \row - \li \br - And the final example with a chart that uses a CategoryAxis to make the data easier - to understand. - \br - \br - \snippet qmlpolarchart/qml/qmlpolarchart/View3.qml 1 - \li \inlineimage examples_qmlpolarchart3.png - \endtable + We begin with a chart that has a spline series and a scatter series with random + data. Both series use the same axes. + + \image examples_qmlpolarchart1.png + \snippet qmlpolarchart/qml/qmlpolarchart/View1.qml 1 + + The next example shows a chart with some accurate historical data for which we need + to use a DateTimeAxis and a AreaSeries. + + \image examples_qmlpolarchart2.png + \snippet qmlpolarchart/qml/qmlpolarchart/View2.qml 1 + + And the final example with a chart that uses a CategoryAxis to make the data easier + to understand. + + \image examples_qmlpolarchart3.png + \snippet qmlpolarchart/qml/qmlpolarchart/View3.qml 1 */ diff --git a/src/charts/doc/src/examples-scatterinteractions.qdoc b/src/charts/doc/src/examples-scatterinteractions.qdoc index 95ca37c..780e434 100644 --- a/src/charts/doc/src/examples-scatterinteractions.qdoc +++ b/src/charts/doc/src/examples-scatterinteractions.qdoc @@ -18,7 +18,7 @@ /*! \example scatterinteractions - \title ScatterInteractions Example + \title Scatter Interactions Example \ingroup qtcharts_examples \brief This example shows how to create a simple scatter chart and how to interact with the diff --git a/src/charts/doc/src/examples-temperaturerecords.qdoc b/src/charts/doc/src/examples-temperaturerecords.qdoc index 4b9f702..ff0caa1 100644 --- a/src/charts/doc/src/examples-temperaturerecords.qdoc +++ b/src/charts/doc/src/examples-temperaturerecords.qdoc @@ -18,7 +18,7 @@ /*! \example temperaturerecords - \title Temperature records example + \title Temperature Records Example \ingroup qtcharts_examples \brief The example shows how to create a bar chart with negative bars. diff --git a/src/charts/doc/src/index.qdoc b/src/charts/doc/src/index.qdoc index 882b865..78384fe 100644 --- a/src/charts/doc/src/index.qdoc +++ b/src/charts/doc/src/index.qdoc @@ -21,8 +21,7 @@ \page index.html \keyword About - Qt Charts is a part of the Qt Enterprise addons package. It provides a set of easy to use chart - components which are available for Qt customers. It uses the Qt Graphics View + Qt Charts module provides a set of easy to use chart components. It uses the Qt Graphics View Framework, therefore charts can be easily integrated to modern user interfaces. Qt Charts can be used as QWidgets, QGraphicsWidget, or QML types. Users can easily create impressive graphs by selecting one of the charts themes. diff --git a/src/charts/doc/src/qtcharts.qdoc b/src/charts/doc/src/qtcharts.qdoc index 59579af..db0cfd3 100644 --- a/src/charts/doc/src/qtcharts.qdoc +++ b/src/charts/doc/src/qtcharts.qdoc @@ -48,17 +48,11 @@ The Qt Charts QML API is an intuitive and simple way to show charts in your QML applications. - \table - \row - \li \br - Use the following QML to create a simple pie chart: - \br - \br - \snippet qmlpiechart/qml/qmlpiechart/main.qml 1 - \snippet qmlpiechart/qml/qmlpiechart/main.qml 2 - \snippet qmlpiechart/qml/qmlpiechart/main.qml 3 - \li \inlineimage examples_qmlpiechart.png - \endtable + Use the following QML to create a simple pie chart: + \image examples_qmlpiechart.png + \snippet qmlpiechart/qml/qmlpiechart/main.qml 1 + \snippet qmlpiechart/qml/qmlpiechart/main.qml 2 + \snippet qmlpiechart/qml/qmlpiechart/main.qml 3 \note Since Qt Creator 3.0 the project created with Qt Quick Application wizard based on Qt Quick 2 template uses QGuiApplication by default. As Qt Charts utilizes Qt Graphics View diff --git a/src/charts/piechart/qpieseries.cpp b/src/charts/piechart/qpieseries.cpp index 2b4c878..cfd3715 100644 --- a/src/charts/piechart/qpieseries.cpp +++ b/src/charts/piechart/qpieseries.cpp @@ -48,11 +48,8 @@ QT_CHARTS_BEGIN_NAMESPACE Full pie is 360 degrees where 0 is at 12 a'clock. See the \l {PieChart Example} {pie chart example} or \l {DonutChart Example} {donut chart example} to learn how to use QPieSeries. - \table 100% - \row - \li \image examples_piechart.png - \li \image examples_donutchart.png - \endtable + \image examples_piechart.png + \image examples_donutchart.png */ /*! \qmltype PieSeries