From 66fa88d106401d019172e2cdb6d0de2b2a22df1f 2013-09-16 06:26:32 From: Nico Vertriest Date: 2013-09-16 06:26:32 Subject: [PATCH] Doc: language review of Qt Charts doc Change-Id: I6bdf7b64851d1f0e2b98f37cbf9844aeb205bed1 Reviewed-by: Miikka Heikkinen --- diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index d95e7a3..7b180ee 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -3,10 +3,11 @@ \title Qt Charts API \keyword All Classes - Charts API is build on top of Qt Graphics View Framework. Charts can be displayed as QGraphicsWidget using QChart class. However - there is also convenience class QChartView which is QWidget based. These lets quickly use Qt Charts as normal Qt widget. + Charts API is built on top of Qt Graphics View Framework. Charts can be displayed as QGraphicsWidget using the QChart class. However + there is also the convenience class QChartView, which is QWidget based. These enable us to quickly use Qt Charts as a normal Qt widget. - Each chart type is represented by QAbstractSeries derived class. To create given chart type users have to use instance of related series class and add it to QChart instance. + Each chart type is represented by the QAbstractSeries derived class. To create charts, the users have to use an instance of the related + series class and add it to a QChart instance. \code QLineSeries* series = new QLineSeries(); series->add(0, 6); @@ -35,7 +36,7 @@
  • QAbstractAxis
  • QValueAxis
  • QLogValueAxis
  • -
  • QBarCategoryAxis
  • +
  • QBarCategoryAxis
  • QCategoryAxis
  • QDateTimeAxis
  • QLegend
  • @@ -96,5 +97,5 @@ \endraw - + */ diff --git a/doc/src/demos-audio.qdoc b/doc/src/demos-audio.qdoc index de7b452..f5d5428 100644 --- a/doc/src/demos-audio.qdoc +++ b/doc/src/demos-audio.qdoc @@ -3,6 +3,6 @@ \title Audio demo \subtitle - This demos shows drawing of the dynamic data (microphone input) + This demo shows the drawing of dynamic data (microphone input). \image demos_audio.png */ diff --git a/doc/src/demos-callout.qdoc b/doc/src/demos-callout.qdoc index 126c97a..46b7263 100644 --- a/doc/src/demos-callout.qdoc +++ b/doc/src/demos-callout.qdoc @@ -6,7 +6,7 @@ This demo shows how to draw an additional element (a callout) on top of the chart. \image demos_callout.png - QChart class provides two methods that map between the scene coordinates and the series' domain (defined by the axes ranges). + QChart class provides two methods that map between the scene coordinates and the series domain (defined by the axes ranges). QPointF QChart::mapToPosition(const QPointF &value, QAbstractSeries *series) diff --git a/doc/src/demos-chartthemes.qdoc b/doc/src/demos-chartthemes.qdoc index 66a4ae8..a35b3d5 100644 --- a/doc/src/demos-chartthemes.qdoc +++ b/doc/src/demos-chartthemes.qdoc @@ -3,9 +3,10 @@ \title Chart themes demo \subtitle - This demo shows the look and feel of the different built in themes for all supported chart types. - The background palette of the application is also customized according to the selected theme, to make the result - look harmonious. + This demo shows the look and feel of the different built-in themes for all supported chart types. + In order to give the result a more harmonious look, the background palette of the application is + customized to the theme selected. + \image demo_chartthemes_light.png \image demo_chartthemes_brown_sand.png \image demo_chartthemes_blue_cerulean.png diff --git a/doc/src/demos-dynamicspline.qdoc b/doc/src/demos-dynamicspline.qdoc index b2706e4..fd90493 100644 --- a/doc/src/demos-dynamicspline.qdoc +++ b/doc/src/demos-dynamicspline.qdoc @@ -3,7 +3,7 @@ \title Dynamic spline demo \subtitle - The example shows how to draw dynamic data. + This example shows how to draw dynamic data. \image demos_dynamicspline1.png \image demos_dynamicspline2.png diff --git a/doc/src/demos-nesteddonuts.qdoc b/doc/src/demos-nesteddonuts.qdoc index e18ba49..2ca50cc 100644 --- a/doc/src/demos-nesteddonuts.qdoc +++ b/doc/src/demos-nesteddonuts.qdoc @@ -3,10 +3,10 @@ \title Nested donuts demo \subtitle - This example shows how to use create a nested donuts chart using QPieSeries API. + This example shows how to create a nested donuts chart using the QPieSeries API. \image demos_nesteddonuts.png - Let's start by creating a QChartView instance and enabling the Antialiasing on it. QChart object is then obtained from the QChartView instance. + Let's start by creating a QChartView instance and enabling the Antialiasing on it. A QChart object is then obtained from the QChartView instance. The legend is disabled and the title of the chart is set. Last line enables the animations of the chart. \snippet ../demos/nesteddonuts/widget.cpp 1 @@ -16,11 +16,11 @@ \snippet ../demos/nesteddonuts/widget.cpp 2 - Following block of code defines the individual donuts and their slices. First new QPieSeries object is created. + The following block of code defines the individual donuts and their slices. First a new QPieSeries object is created. The number of slices in each donut is randomized. The internal for loop creates the slices with a random value and label same as the value. Next the label of the slice is set to be visible and its color is set to white. - To make the example more interesting the hovered signal of the slice is connected to widget's slot which inner workings are explained later. + To make the example more interesting the hovered signal of the slice is connected to widget's slot, of which the inner workings are explained later. Finally the slice is added to the donut. The donut's size is adjusted to achieve the nesting of the donuts. Then the donut is added to the widget's list of donuts and to the chart. @@ -35,12 +35,12 @@ \snippet ../demos/nesteddonuts/widget.cpp 5 The widget's updatedRotation slot is defined below. - It goes through all of the donuts and modifies thier current rotation by a random value. + It goes through all of the donuts and modifies their current rotation by a random value. \snippet ../demos/nesteddonuts/widget.cpp 6 The earlier mentioned explodeSlice slot code is provided below. - If the slice is set to exploded then stop the timer that controls the donuts rotation. + If the slice is set to exploded, then stop the timer that controls the donuts rotation. Then the slice's start and end angles are obtained from the slice. To highlight the selected slice all the other donuts that lie outward from the one that contains the selected slice have their start and end angles modified so that they wouldn't "block" the way for the hightlighted slice. diff --git a/doc/src/demos-qmlchart.qdoc b/doc/src/demos-qmlchart.qdoc index 3279936..2573f9b 100644 --- a/doc/src/demos-qmlchart.qdoc +++ b/doc/src/demos-qmlchart.qdoc @@ -3,8 +3,8 @@ \title Qml charts demo \subtitle - This is a basic demonstration how to use the different chart types by using qml. Creating each chart type begins - with creation of a ChartView. + 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 @@ -19,7 +19,7 @@ \table \row \o \br - To create a chart with line series: + To create a chart with a line series: \br \br \snippet ../demos/qmlchart/qml/qmlchart/View2.qml 1 @@ -49,7 +49,7 @@ \table \row \o \br - Then couple of scatter series: + Then a couple of scatter series: \br \br \snippet ../demos/qmlchart/qml/qmlchart/View5.qml 1 @@ -109,7 +109,7 @@ \table \row \o \br - And finally an example how to create a donut chart with two pie series: + And finally an example demonstrating how to create a donut chart with two pie series: \br \br \snippet ../demos/qmlchart/qml/qmlchart/View12.qml 1 diff --git a/doc/src/demos-qmlcustomizations.qdoc b/doc/src/demos-qmlcustomizations.qdoc index 9be13f2..3efb2fb 100644 --- a/doc/src/demos-qmlcustomizations.qdoc +++ b/doc/src/demos-qmlcustomizations.qdoc @@ -8,19 +8,19 @@ This application shows you how to customize different visual properties of a ChartView and series. It shows a wheel of fortune by customizing a pie series. - First we create ChartView and a couple of series. + First we create the ChartView and a couple of series. \snippet ../demos/qmlcustomizations/qml/qmlcustomizations/main.qml 1 The application data is generated in Component.onCompleted of the main rectangle: \snippet ../demos/qmlcustomizations/qml/qmlcustomizations/main.qml 2 The following customizations are done repeatedly with a timer. To highlight one of the pie slices at time - we modify it's exploded property: + we modify its exploded property: \snippet ../demos/qmlcustomizations/qml/qmlcustomizations/main.qml 3 Then an animation using a scatter series with one data point: \snippet ../demos/qmlcustomizations/qml/qmlcustomizations/main.qml 4 - When the wheel of fortune has stopped, we make the active slice blink by modifying it's colors. + When the wheel of fortune has stopped, we make the active slice blink by modifying its colors. \snippet ../demos/qmlcustomizations/qml/qmlcustomizations/main.qml 5 */ diff --git a/doc/src/demos-qmlcustomlegend.qdoc b/doc/src/demos-qmlcustomlegend.qdoc index afcd392..9e2d973 100644 --- a/doc/src/demos-qmlcustomlegend.qdoc +++ b/doc/src/demos-qmlcustomlegend.qdoc @@ -3,7 +3,7 @@ \title Qml Custom Legend \subtitle - This demo application shows you how to create your own, custom legend instead of using the + This demo application shows you how to create your own custom legend instead of using the built-in legend of ChartView API. \table @@ -18,7 +18,7 @@ \o \inlineimage demos-qmlcustomlegend1.png \row \o \br - Hovering with mouse on top of the legend will highlight the hovered series + Hovering with mouse on top of the legend will highlight the hovered series. \br (see CustomLegend.qml). \br diff --git a/doc/src/demos-qmlcustommodel.qdoc b/doc/src/demos-qmlcustommodel.qdoc index 4c75601..2ba671c 100644 --- a/doc/src/demos-qmlcustommodel.qdoc +++ b/doc/src/demos-qmlcustommodel.qdoc @@ -9,9 +9,9 @@ First we create a ChartView: \snippet ../demos/qmlcustommodel/qml/qmlcustommodel/main.qml 1 - Then our data model that contains the shares of top-5 car manufacturers in Finland for the last 5 years. The model + Then our data model that contains the shares of the top 5 car manufacturers in Finland for the last 5 years. The model could be constructed from various sources depending on the use case, but here we use static data for the sake of - simplicity. Check customtablemodel.cpp, declarativemodel.cpp and plugin.cpp to see how to make your own + simplicity. Check customtablemodel.cpp, declarativemodel.cpp, and plugin.cpp to see how to make your own QAbstractItemModel accessible on QML. \snippet ../demos/qmlcustommodel/qml/qmlcustommodel/main.qml 2 @@ -19,8 +19,8 @@ the car manufacturers in Finland in 2011: \snippet ../demos/qmlcustommodel/qml/qmlcustommodel/main.qml 3 - And one line series for each manufacturer presenting the share between 2007-2011, for example this one is for - Volkswagen. The series is not visible by default; it is made visible when the user clicks on the Volkswagen slice + And one line series for each manufacturer presenting the share between 2007-2011, for example for Volkswagen. + The series is not visible by default. It is made visible when the user clicks on the Volkswagen slice on the pie series: \snippet ../demos/qmlcustommodel/qml/qmlcustommodel/main.qml 4 diff --git a/doc/src/demos-qmlf1legends.qdoc b/doc/src/demos-qmlf1legends.qdoc index ae35337..a0b7f78 100644 --- a/doc/src/demos-qmlf1legends.qdoc +++ b/doc/src/demos-qmlf1legends.qdoc @@ -5,7 +5,7 @@ \image demos_qmlf1legends.png - This application demonstrates using XmlListModel as a datasource for a Chart. + This application demonstrates how to use XmlListModel as a datasource for a Chart. Let's define an empty ChartView first: \snippet ../demos/qmlf1legends/qml/qmlf1legends/main.qml 1 diff --git a/doc/src/demos-qmloscilloscope.qdoc b/doc/src/demos-qmloscilloscope.qdoc index 271df75..be5b295 100644 --- a/doc/src/demos-qmloscilloscope.qdoc +++ b/doc/src/demos-qmloscilloscope.qdoc @@ -4,12 +4,12 @@ \image demos_qmloscilloscope.png - Oscilloscope application demonstrates how to use Qt Charts QML API to implement an + The oscilloscope application demonstrates how to use the Qt Charts QML API to implement an application with strict performance requirements. The application uses generated data with configurable characteristics to mimic a simple oscilloscope user interface. To find out the actual screen refresh performance of the application, you can set QML_SHOW_FRAMERATE = 1 to your run environment settings to get the framerate shown in the application output console. - I.e. go to Projects - Run - Run environment in Qt Creator and select Add. Then you can + To do so go to Projects - Run - Run environment in Qt Creator and select Add. Then you can experiment with the different configurable options of the demo application to find the configuration that gives you the best performance in your environment. @@ -28,7 +28,7 @@ \snippet ../demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1 The data of the line series is updated with a QML timer. In a real life application the - updating could triggered with a signal from Qt C++ code. + updating could be triggered with a signal from Qt C++ code. \snippet ../demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2 The oscilloscope also allows you to switch the type of the series used for visualizing the diff --git a/doc/src/demos-qmlpolarchart.qdoc b/doc/src/demos-qmlpolarchart.qdoc index 04c7037..faa736c 100644 --- a/doc/src/demos-qmlpolarchart.qdoc +++ b/doc/src/demos-qmlpolarchart.qdoc @@ -3,7 +3,7 @@ \title Qml Polar Chart \subtitle - This is a demonstration of how to use polar chart in your QML application. + This is a demonstration on how to use a polar chart in your QML application. \table \row @@ -16,8 +16,8 @@ \o \inlineimage demos_qmlpolarchart1.png \row \o \br - The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis - and AreaSeries. + 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 ../demos/qmlpolarchart/qml/qmlpolarchart/View2.qml 1 diff --git a/doc/src/demos-qmlweather.qdoc b/doc/src/demos-qmlweather.qdoc index 666c8fb..1f190d0 100644 --- a/doc/src/demos-qmlweather.qdoc +++ b/doc/src/demos-qmlweather.qdoc @@ -5,7 +5,7 @@ \image demos_qmlweather.png - This is a basic demonstration how to use the different chart types by using qml. By default the + This is a basic demonstration showing how to use the different chart types by using qml. By default the application uses static test data to mimic a weather forecast. You can also obtain an application id from http://www.worldweatheronline.com/ to get access to their weather API. You can then give your application id as a parameter to the Qml Weather executable to make it use live data. @@ -15,7 +15,7 @@ bin\qmlweather.exe 1234567890abcdef123456 \endcode - The demo application uses a ChartView and a couple of series to visualize weather data: + The demo application uses a ChartView and a some series to visualize weather data: \snippet ../demos/qmlweather/qml/qmlweather/main.qml 1 \snippet ../demos/qmlweather/qml/qmlweather/main.qml 2 diff --git a/doc/src/demos-quick2chart.qdoc b/doc/src/demos-quick2chart.qdoc index 76f0c32..f441bad 100644 --- a/doc/src/demos-quick2chart.qdoc +++ b/doc/src/demos-quick2chart.qdoc @@ -11,5 +11,5 @@ \snippet ../demos/quick2chart/qml/quick2chart/View1.qml 2 - Additionally, antialiasing is set with qml property in Qt Quick 2. + Additionally, antialiasing is set with the qml property in Qt Quick 2. */ diff --git a/doc/src/demos-quick2oscilloscope.qdoc b/doc/src/demos-quick2oscilloscope.qdoc index 09c1315..2815258 100644 --- a/doc/src/demos-quick2oscilloscope.qdoc +++ b/doc/src/demos-quick2oscilloscope.qdoc @@ -4,13 +4,13 @@ \image demos_qmloscilloscope.png - This is a reimplementation of \l{Oscilloscope} demo in Qt Quick 2. + This is a reimplementation of the \l{Oscilloscope} demo in Qt Quick 2. The main difference in qml files is importing the correct version of Qt Quick: \snippet ../demos/quick2oscilloscope/qml/quick2oscilloscope/main.qml 3 \note QML_SHOW_FRAMERATE environment variable doesn't work with Qt Quick 2. - Starting with Qt 5.1.0, QSG_RENDER_TIMING environment variable can be used + From Qt 5.1.0 on, the QSG_RENDER_TIMING environment variable can be used similarly to display rendering time. */ diff --git a/doc/src/demos.qdoc b/doc/src/demos.qdoc index 17dac0c..453f4c9 100644 --- a/doc/src/demos.qdoc +++ b/doc/src/demos.qdoc @@ -2,7 +2,7 @@ \page demos.html \title Qt Charts Demos \keyword Demos - + \raw HTML
    diff --git a/doc/src/examples-areachart.qdoc b/doc/src/examples-areachart.qdoc index d24ffdf..02c9085 100644 --- a/doc/src/examples-areachart.qdoc +++ b/doc/src/examples-areachart.qdoc @@ -3,28 +3,28 @@ \title AreaChart Example \subtitle - The example shows how to create simple area chart. + The example shows how to create a simple area chart. \image examples_areachart.png - - To create area charts, we need two QLineSeries instances. They are going to define upper and lower boundary of the area. + + To create area charts, we need two QLineSeries instances. They are going to define the upper and lower boundary of the area. \snippet ../examples/areachart/main.cpp 1 - We add data to both series, we use stream operator. + We add data to both series and use the stream operator. \snippet ../examples/areachart/main.cpp 2 - Now we create QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline. + Now we create a QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline. \snippet ../examples/areachart/main.cpp 3 - - In the end we create QChartView instance, set title, set anti-aliasing and add area series. We also create the default axes and specify the ranges on them. - - \snippet ../examples/areachart/main.cpp 4 - - Chart is ready to be shown. - - \snippet ../examples/areachart/main.cpp 5 - + + Last we create the QChartView instance, set the title, set anti-aliasing, and add the area series. We also create the default axes and specify the ranges on them. + + \snippet ../examples/areachart/main.cpp 4 + + The chart is ready to be shown. + + \snippet ../examples/areachart/main.cpp 5 + */ diff --git a/doc/src/examples-barchart.qdoc b/doc/src/examples-barchart.qdoc index 91e6058..3b020da 100644 --- a/doc/src/examples-barchart.qdoc +++ b/doc/src/examples-barchart.qdoc @@ -7,10 +7,10 @@ \image examples_barchart.png - The barsets are used in same way in all barcharts. - To illustrate difference between various barcharts, we use same data in examples. - Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data - to them. The data is appended here with << operator. Alternatively the append method could be used. + The barsets are used in the same way in all barcharts. + To illustrate the difference between various barcharts, we use the same data in the examples. + Data that the barchart visualizes, is defined by the QBarSet instances. Here we create the sets and append data + to them. The data is appended here with the << operator. Alternatively, the append method could be used. \snippet ../examples/barchart/main.cpp 1 @@ -20,19 +20,18 @@ \snippet ../examples/barchart/main.cpp 2 Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + setAnimationOptions(QChart::SeriesAnimations) \snippet ../examples/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 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 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. \snippet ../examples/barchart/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do that, we get the legend pointer from the chart and set it to visible. We also place the legend to the bottom of the chart by setting its alignment to Qt::AlignBottom. \snippet ../examples/barchart/main.cpp 5 @@ -40,8 +39,7 @@ \snippet ../examples/barchart/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + The chart is ready to be shown. We set the chart to be central widget of the window. We also set the size for the chart window and show it. \snippet ../examples/barchart/main.cpp 7 */ diff --git a/doc/src/examples-barmodelmapper.qdoc b/doc/src/examples-barmodelmapper.qdoc index 8817abb..81c109d 100644 --- a/doc/src/examples-barmodelmapper.qdoc +++ b/doc/src/examples-barmodelmapper.qdoc @@ -8,32 +8,32 @@ \image examples_barmodelmapper.png Let's start by creating an instance of CustomTableModel class. - CustomTableModel class is derived from QAbstractTableModel and it was created for the purpose of this example. - The constructor of this class populates the internal data store of the model with the data that is good for our chart example. + The CustomTableModel class is derived from QAbstractTableModel, and it was created for the purpose of this example. + The constructor of this class populates the model's internal data store with the data required for our chart example. \snippet ../examples/barmodelmapper/tablewidget.cpp 1 We now have a model with data that we would like to display both on the chart and in a QTableView. - First, we create QTableView and tell it use the model as a data source. To have the data presented nicely the minimum width of the table view is set and its headers resize mode changed to stretch. + First, we create QTableView and tell it to use the model as a data source. To have the data presented nicely, the minimum width of the table view is set and its headers resize mode changed to stretch. \snippet ../examples/barmodelmapper/tablewidget.cpp 2 - Now we need QChart instance to display the same data on the chart. - We also enable animations. It makes it easier to see how modifying the model's data affect the chart. + Now we need a QChart instance to display the same data on the chart. + We also enable animations. It makes it easier to see how a modification to the model's data affects the chart. \snippet ../examples/barmodelmapper/tablewidget.cpp 3 - First line of the code below creates new bar series. Variables firstRow and rowCount are used to define a custom model mapping. + The first line of the code below creates new bar series. Variables firstRow and rowCount are used to define a custom model mapping. Custom mapping allows to take only part of the data from the model. In this case data from 5 rows starting with the row with the index 3. - Following three lines create an instance of QVBarModelMapper class and specifie that data for the bar sets should be taken from the model's columns with indexes from 1 to 4(inclusive). + The following three lines create an instance of the QVBarModelMapper class and specify that the data for the bar sets should be taken from the model's columns with indexes from 1 to 4 (inclusive). To create a connection between the series and the model we set both of those objects to QVBarModelMapper. Finally the series is added to the chart. \snippet ../examples/barmodelmapper/tablewidget.cpp 4 - To show in QTableView which data corresponds with which bar set this example uses table coloring. - When series is added to the chart it is assigned a color based on the currently selected theme. + To show in QTableView which data corresponds with which bar set, this example uses table coloring. + When series is added to the chart, it is assigned a color based on the currently selected theme. Code below extracts that color from the series and uses it to create colored QTableView. Coloring of the view is not a part of the QChart functionality. @@ -44,14 +44,14 @@ \snippet ../examples/barmodelmapper/tablewidget.cpp 6 - To avoid setting up the QGraphicsScene we use QChartView class that does it for us. QChart object pointer is used as a parameter of the QChartView constructor. + To avoid setting up the QGraphicsScene we use the QChartView class that does it for us. The QChart object pointer is used as a parameter of the QChartView constructor. To make the render look nicer Antialiasing is turned on and the minimum size of the chartView widget is set. \snippet ../examples/barmodelmapper/tablewidget.cpp 7 - Finally we place both widgets in a layout and use the layout as the application layout. + Finally, we place both widgets in a layout and use the layout as the application layout. \snippet ../examples/barmodelmapper/tablewidget.cpp 8 - Application is ready. Try modifying the data in the table view and see how it affects the chart. + The application is ready. Try modifying the data in the table view and see how it affects the chart. */ diff --git a/doc/src/examples-boxplotchart.qdoc b/doc/src/examples-boxplotchart.qdoc index 9221435..7bcc362 100644 --- a/doc/src/examples-boxplotchart.qdoc +++ b/doc/src/examples-boxplotchart.qdoc @@ -3,7 +3,7 @@ \title Box and Whiskers Example \subtitle - The example shows how to create a box-and-whiskers chart. It also shows how to read the non-continuous data from the file, + The example shows how to create a box-and-whiskers chart. It also shows how to read the non-continuous data from a file, arrange it and find medians needed for box-and-whiskers plotting. \image examples_boxplotchart.png @@ -23,35 +23,35 @@ \snippet ../examples/boxplotchart/main.cpp 3 - In this code snippet a new QChart instance is created and previously created series are added to it. Also title is defined and + In this code snippet a new QChart instance is created and previously created series are added to it. The title is also defined and animation is set to be SeriesAnimation. \snippet ../examples/boxplotchart/main.cpp 4 - Here we ask chart to create default axes for our presentation. We also set range for vertical axis by querying the pointer - for the axis from the chart and then setting the min and max for that axis. + Here we ask the chart to create default axes for our presentation. We also set the range for the vertical axis by querying the pointer + for the axis from the chart, and then setting the min and max for that axis. \snippet ../examples/boxplotchart/main.cpp 5 - In this section we set legends visible and place them at the bottom of the chart. + In this section we set the legends to be visible and place them at the bottom of the chart. \snippet ../examples/boxplotchart/main.cpp 6 - Finally we add the chart onto a view. We also turn on the antialiasing for the chartView. + Finally, we add the chart onto a view. We also turn on the antialiasing for the chartView. \snippet ../examples/boxplotchart/main.cpp 7 - The chart is ready to be shown. We set the chart to be central widget of the window. + The chart is ready to be shown. We set the chart to be the central widget of the window. We also set the size for the chart window and show it. \snippet ../examples/boxplotchart/main.cpp 8 - Here the method readBox is explained in detail. Firstly a line is read from the file and lines starting with # are rejected + Here the method readBox is explained in detail. Firstly, a line is read from the file and lines starting with # are rejected since they are considered as comment lines. \snippet ../examples/boxplotchart/boxdatareader.cpp 1 - On the file the data is arranged as number, space, number, space and so on. On this snippet the line is split into single number strings which + In this file the data is arranged as number, space, number, or space. On this snippet the line is split into single number strings which are stored on QStringList. \snippet ../examples/boxplotchart/boxdatareader.cpp 2 @@ -62,14 +62,14 @@ \snippet ../examples/boxplotchart/boxdatareader.cpp 3 - Here is a code sample how to select extremes and medians from the continuous data. Firstly a new QBoxSet is created. + Below you will find a code sample showing how to select extremes and medians from the continuous data. Firstly a new QBoxSet is created. Lower and upper extremes are simple to select; they are just first and last items on the sortedList. For medians we use a helper - method findMedian which is explained later. For the median from the upper half we need to adjust the begin number if + method findMedian which is explained later. For the median from the upper half we need to adjust the begin number if the amount of the numbers is even or uneven. The end number for lower half comes naturally from int rounding. \snippet ../examples/boxplotchart/boxdatareader.cpp 4 - Here's the code sample for the method findMedian. If the amount of numbers is uneven we select the number from + Below you will find the code sample for the method findMedian. If the amount of numbers is uneven we select the number from the middle. For even amount numbers we take two numbers from the middle and calculate the mean value. \snippet ../examples/boxplotchart/boxdatareader.cpp 5 diff --git a/doc/src/examples-customchart.qdoc b/doc/src/examples-customchart.qdoc index 323cd22..47005d7 100644 --- a/doc/src/examples-customchart.qdoc +++ b/doc/src/examples-customchart.qdoc @@ -1,6 +1,6 @@ /*! \example examples/customchart - \title Custom chart example + \title Custom Chart Example \subtitle This example shows how to customize the appearance of the different elements on a chart. @@ -9,16 +9,16 @@ We begin by creating a simple line series and a chart object. \snippet ../examples/customchart/main.cpp 1 - Let the customization begin. First we customize the series and the chart's title and background. + First we customize the series and the chart's title and background. \snippet ../examples/customchart/main.cpp 2 Then we customize the axes. \snippet ../examples/customchart/main.cpp 3 - And the axis label values and ranges. Once the axes are ready we set them to be used by the chart. + Then the axis label values and ranges. Once the axes are ready, we set them to be used by the chart. \snippet ../examples/customchart/main.cpp 4 - Finally we create a view containing the chart. + Finally, we create a view containing the chart. \snippet ../examples/customchart/main.cpp 5 Now we are ready to show the chart on a main window. diff --git a/doc/src/examples-datetimeaxis.qdoc b/doc/src/examples-datetimeaxis.qdoc index c689965..183a216 100644 --- a/doc/src/examples-datetimeaxis.qdoc +++ b/doc/src/examples-datetimeaxis.qdoc @@ -6,32 +6,33 @@ The example shows how to use QLineChart with QDateTimeAxis. \image examples_datetimeaxis.png - - To create line chart, QLineSeries instance is needed. Let's create one. + + To create line chart, QLineSeries instance is needed. Let's create one. \snippet ../examples/datetimeaxis/main.cpp 1 - On the charts we will present how the number of sun spots changes in time. The data (by Space Weather Prediction Center) is read from a text file. - In the snippet below notice how QDateTime::toMSecsSinceEpoch method is used to convert the QDateTime object into a number that can be passed to QLineSeries append method. + On the charts we will present how the number of sun spots changes in time. The data (from the Space Weather Prediction Center) is read from a text file. + In the snippet below, notice how the QDateTime::toMSecsSinceEpoch method is used to convert the QDateTime object into a number that can be passed to the QLineSeries append method. \snippet ../examples/datetimeaxis/main.cpp 2 - To present the data on the chart we need QChart instance. We add the series to it, hide the legend, create the default axes and set the title of the chart. + To present the data on the chart we need the QChart instance. We add the series to it, hide the legend, create the default axes and set the title of the chart. \snippet ../examples/datetimeaxis/main.cpp 3 - Because we use QLineSeries calling createDefaultAxes will create QValueAxis both as X and Y axis. To use QDateTimeAxis we need to set it manually to the chart. - First the instance of QDateTimeAxis is created, then the number of ticks that are to be shown is set. The number of sun spots is provided as an average for the month therefore we don't need the axis labels to contain the information about the time and the day. This is achieved by setting a custom label format. - Please refer to QDateTime::toString() method documentation to learn about the available format options. + Since we use QLineSeries, calling createDefaultAxes will create QValueAxis both as X- and Y-axis. To use QDateTimeAxis we need to set it manually to the chart. + First, the instance of QDateTimeAxis is created, then the number of ticks to be shown is set. The number of sun spots is provided as an average for the month. + Therefore we don't need the axis labels to contain the information about the time and the day. This is achieved by setting a custom label format. + Please refer to the QDateTime::toString() method documentation to learn about the available format options. \snippet ../examples/datetimeaxis/main.cpp 4 - Then we create a QChartView object with QChart as a parameter. This way we don't need to create QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. - - \snippet ../examples/datetimeaxis/main.cpp 5 + Then we create a QChartView object with QChart as a parameter. This way we don't need to create the QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. + + \snippet ../examples/datetimeaxis/main.cpp 5 - Chart is ready to be shown. + The chart is ready to be shown. \snippet ../examples/datetimeaxis/main.cpp 6 - + */ diff --git a/doc/src/examples-donutbreakdown.qdoc b/doc/src/examples-donutbreakdown.qdoc index 79347bd..a8a35d1 100644 --- a/doc/src/examples-donutbreakdown.qdoc +++ b/doc/src/examples-donutbreakdown.qdoc @@ -14,7 +14,7 @@ \snippet ../examples/donutbreakdown/main.cpp 2 - Our own chart works so that in the constructor we create a main series + Our own chart works in such a way that we create a main series in the constructor we create a main series, which aggregates the data provided by the breakdown series. This is the piechart in the center. \snippet ../examples/donutbreakdown/donutbreakdownchart.cpp 1 @@ -29,7 +29,7 @@ \snippet ../examples/donutbreakdown/donutbreakdownchart.cpp 3 - Legend markers are customized to show the breakdown percentage and markers for the main level slices are hidden. + The legend markers are customized to show the breakdown percentage. The markers for the main level slices are hidden. \snippet ../examples/donutbreakdown/donutbreakdownchart.cpp 4 @@ -38,7 +38,7 @@ \snippet ../examples/donutbreakdown/mainslice.cpp 1 \snippet ../examples/donutbreakdown/mainslice.cpp 2 - And now that we have our chart defined we can finally create a QChartView and show the chart. + Now that we have our chart defined, we can finally create a QChartView and show the chart. \snippet ../examples/donutbreakdown/main.cpp 3 diff --git a/doc/src/examples-donutchart.qdoc b/doc/src/examples-donutchart.qdoc index ca4e690..e49103f 100644 --- a/doc/src/examples-donutchart.qdoc +++ b/doc/src/examples-donutchart.qdoc @@ -3,6 +3,6 @@ \title Donutchart Example \subtitle - The example shows how to create simple donut chart and do some customizations to a slice. + This example shows how to create a simple donut chart, and do some customizations to a slice. \image examples_donutchart.png */ diff --git a/doc/src/examples-horizontalbarchart.qdoc b/doc/src/examples-horizontalbarchart.qdoc index f9b0221..ed705c0 100644 --- a/doc/src/examples-horizontalbarchart.qdoc +++ b/doc/src/examples-horizontalbarchart.qdoc @@ -4,36 +4,36 @@ \subtitle The example shows how to create a horizontal bar chart. QHorizontalBarChart shows the data in sets as separate bars, which are grouped in categories. QHorizontalBarChart works just like - QBarChart, except that the bars are drawn horizontally on the chart. + QBarChart, except that the bars are drawn horizontally on the chart. \image examples_horizontalbarchart.png - The barsets are used in same way in all barcharts. - To illustrate difference between various barcharts, we use same data in examples. - Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data - to them. The data is appended here with << operator. Alternatively the append method could be used. + The bar sets are used in the same way in all bar charts. + To illustrate the difference between various bar charts, we use the same data in all examples. + Data that bar chart visualizes, is defined by QBarSet instances. Here we create the sets and append data + to them. The data is appended here with << operator. Alternatively, the append method could also be used. \snippet ../examples/horizontalbarchart/main.cpp 1 - We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. - First value of each set are gropuped together at first category second value to second category and so on. + We create the series and append the bar sets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. + The first values of each set are grouped together in the first category; the second values in the second category, and so on. \snippet ../examples/horizontalbarchart/main.cpp 2 Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + setAnimationOptions(QChart::SeriesAnimations). \snippet ../examples/horizontalbarchart/main.cpp 3 - - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. Here we create a category axis with list of categories and - set it to be the y-axis of the chart. The chart takes ownership of axis. For x-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 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. \snippet ../examples/horizontalbarchart/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do so, we get the legend pointer from chart and set it to visible. We also place the legend to the bottom of the chart by setting its alignment + to Qt::AlignBottom. \snippet ../examples/horizontalbarchart/main.cpp 5 @@ -41,8 +41,8 @@ \snippet ../examples/horizontalbarchart/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + The chart is ready to be shown. We set the chart to be the central widget of the window. + We also set the size for the chart window and show it. \snippet ../examples/horizontalbarchart/main.cpp 7 */ diff --git a/doc/src/examples-horizontalpercentbarchart.qdoc b/doc/src/examples-horizontalpercentbarchart.qdoc index 693ed89..73cd654 100644 --- a/doc/src/examples-horizontalpercentbarchart.qdoc +++ b/doc/src/examples-horizontalpercentbarchart.qdoc @@ -3,51 +3,52 @@ \title HorizontalPercentBarChart Example \subtitle - The example shows how to create simple horizontal percent bar chart. Horizontal percent bar chart shows the data in set as percentage of - all sets, per category. - - Creating horizontal percent bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a - horizontal percent bar chart, we use QHorizontalPercentBarSeries api instead of QBarSeries. Also, in the - \l {BarChart Example} {bar chart} we used nice numbers algorithm to make the y axis numbering look better. With - percent bar chart there is no need for that, because the maximum y-axis value is always 100. - + The example shows how to create a simple horizontal percent bar chart. The horizontal percent bar chart shows the data in a set as a percentage of + all sets per category. + + Creating a horizontal percent bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a + horizontal percent bar chart, we use the QHorizontalPercentBarSeries api instead of QBarSeries. Also, in the + \l {BarChart Example} {bar chart}, we used a nice numbers algorithm to make the y-axis numbering look better. With + the percent bar chart there is no need for that, because the maximum y-axis value is always 100. + \image examples_horizontalpercentbarchart.png The barsets are used in same way in all barcharts. - To illustrate difference between various barcharts, we use same data in examples. - Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data + To illustrate the difference between various barcharts, we use same data in examples. + The data which the bar chart visualizes is defined by QBarSet instances. Here we create the sets and append data to them. The data is appended here with << operator. Alternatively the append method could be used. \snippet ../examples/horizontalpercentbarchart/main.cpp 1 - We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. - First values of each set are grouped together at first category second value to second category and so on. + We create the series and append the bar sets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. + The first values of each set are grouped together in the first category, the second value in the second category etc. \snippet ../examples/horizontalpercentbarchart/main.cpp 2 Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + setAnimationOptions(QChart::SeriesAnimations) \snippet ../examples/horizontalpercentbarchart/main.cpp 3 - - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. Here we create a category axis with list of categories and - set it to be the y-axis of the chart. The chart takes ownership of axis. For x-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 + 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. \snippet ../examples/horizontalpercentbarchart/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do that, we get the legend pointer from the chart + and set it to visible. We also place the legend to bottom of the chart by setting its + alignment to Qt::AlignBottom. \snippet ../examples/horizontalpercentbarchart/main.cpp 5 - Finally we add the chart onto a view. We also turn on the antialiasing for the chartView. + Finally, we add the chart onto a view. We also turn on the antialiasing for the chartView. \snippet ../examples/horizontalpercentbarchart/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + The chart is ready to be shown. We set the chart to be the central widget of the window. + We also set the size for the chart window and show it. - \snippet ../examples/horizontalpercentbarchart/main.cpp 7 + \snippet ../examples/horizontalpercentbarchart/main.cpp 7 */ diff --git a/doc/src/examples-horizontalstackedbarchart.qdoc b/doc/src/examples-horizontalstackedbarchart.qdoc index 169537a..a63c9fa 100644 --- a/doc/src/examples-horizontalstackedbarchart.qdoc +++ b/doc/src/examples-horizontalstackedbarchart.qdoc @@ -3,39 +3,40 @@ \title HorizontalStackedBarChart Example \subtitle - The example shows how to create simple stacked horizontal bar chart. Stacked bar chart shows the data in sets as bars that are + The example shows how to create a simple stacked horizontal bar chart. The stacked bar chart shows the data in sets as bars that are stacked on top of each other. The stacking is done per category. - Creating stacked horizontal bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a - stacked horizontal bar chart, we use QHorizontalStackedBarSeries api instead of QBarSeries. + Creating a stacked horizontal bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a + stacked horizontal bar chart, we use the QHorizontalStackedBarSeries api instead of QBarSeries. \image examples_horizontalstackedbarchart.png - - The barsets are used in same way in all barcharts. - To illustrate difference between various barcharts, we use same data in examples. - Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data - to them. The data is appended here with << operator. Alternatively the append method could be used. + + The bar sets are used in same way in all bar charts. + To illustrate the difference between various barcharts, we use the same data in all examples. + The data that barchart visualizes, is defined by the QBarSet instances. Here we create the sets and append data + to them. The data is appended here with the << operator. Alternatively, the append method could also be used. \snippet ../examples/horizontalstackedbarchart/main.cpp 1 - - We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. - First values of each set are grouped together at first category second value to second category and so on. + + We create the series and append the bar sets to it. The series takes ownership of the bar sets. The series groups the data from sets to categories. + The first values of each set are grouped together in the first category, the second values in the second category and so on. \snippet ../examples/horizontalstackedbarchart/main.cpp 2 - Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + Here we create the chart object and add the series to it. We set the title for the chart with setTitle, and then turn on the animations of the series by calling + setAnimationOptions(QChart::SeriesAnimations). \snippet ../examples/horizontalstackedbarchart/main.cpp 3 - - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. Here we create a category axis with list of categories and - set it to be the y-axis of the chart. The chart takes ownership of axis. For x-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 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. \snippet ../examples/horizontalstackedbarchart/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do that, we get the legend pointer from the chart and + set it to visible. We also place the legend to the bottom of the chart by setting its alignment + to Qt::AlignBottom. \snippet ../examples/horizontalstackedbarchart/main.cpp 5 @@ -43,8 +44,8 @@ \snippet ../examples/horizontalstackedbarchart/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + The chart is ready to be shown. We set the chart to be the central widget of the window. + We also set the size for the chart window and show it. \snippet ../examples/horizontalstackedbarchart/main.cpp 7 */ diff --git a/doc/src/examples-legend.qdoc b/doc/src/examples-legend.qdoc index 9f25950..5128e29 100644 --- a/doc/src/examples-legend.qdoc +++ b/doc/src/examples-legend.qdoc @@ -3,10 +3,10 @@ \title Legend Example \subtitle - This example shows how to detach legend from chart and how to attach it back. By default the chart - draws the legend inside same view with the chart. In some cases user may want to draw legend to somewhere else. To make this possible the legend can be detached from the chart. Detaching means that chart doesn't draw the legend or try to change it's layout. Detached legend can then be drawn where user wants, for example in different graphics scene. The behaviour of legend can be inspected by running the legend example. - In example we use barseries where we add or remove barsets. The legend reflects the changes in series. Legend can be detached or attached back to chart and its alignment can be modified. - When legend is detached, it can be resized and positioned freely. + This example shows how to detach the legend from the chart and how to attach it back. By default the chart + draws the legend inside the same view with the chart. In some cases the user may want to draw the legend to somewhere else. To make this possible the legend can be detached from the chart. Detaching means that the chart doesn't draw the legend or try to change its layout. Detached legend can then be drawn wherever the user wishes, for example, in a different graphics scene. The behavior of the legend can be inspected by running the legend example. + In the example we use the bar series where we add or remove the bar sets. The legend reflects the changes in series. The legend can be detached or attached back to the chart and its alignment can be modified. + When the legend is detached, it can be resized and positioned freely. \table \row @@ -14,20 +14,19 @@ \o \inlineimage examples_legend_detach2.png \endtable - Here we turn legend visible and set its alignment to the bottom of the chart. - + Here we turn the legend visible and set its alignment to the bottom of the chart. + \snippet ../examples/legend/mainwidget.cpp 1 - - This snippet shows how to detach the legend from chart. After detaching, we turn its background to visible and set a different color to it. This makes it easier to see, how the items inside legend are arranged - in detached mode. + + This snippet shows how to detach the legend from the chart. After detaching, we turn its background to visible and set a different color to it. This makes it easier to see how the items inside the legend are arranged in detached mode. \snippet ../examples/legend/mainwidget.cpp 2 - Here we attach legend back to chart. The background is turned invisible. - + Here we attach the legend back to the chart. The background is turned invisible. + \snippet ../examples/legend/mainwidget.cpp 3 - This shows how we set the detached legend dimensions. After setting new values, we call update to show changes on screen. - + This shows how we set the detached legend dimensions. After setting the new values, we call update to show changes on screen. + \snippet ../examples/legend/mainwidget.cpp 4 */ diff --git a/doc/src/examples-legendmarkers.qdoc b/doc/src/examples-legendmarkers.qdoc index 0d69b12..7dc85f1 100644 --- a/doc/src/examples-legendmarkers.qdoc +++ b/doc/src/examples-legendmarkers.qdoc @@ -3,17 +3,17 @@ \title LegendMarkers Example \subtitle - The example shows how to make use of legend markers. In this example we create an application which uses QLegendMarker clicked signal to show/hide corresponding series - in chart. The connect marker button connects clicked signal from all markers in legend to handleMarkerClicked slot. + The example shows how to make use of legend markers. In this example we create an application which uses the QLegendMarker clicked signal to show/hide the corresponding series + in a chart. The connect marker button connects a clicked signal from all markers in a legend to the handleMarkerClicked slot. \image examples_legendmarkers.png - Our application has buttons for adding or removing series in chart and button to connect or disconnect legend markers clicked signal to our handler. In the image above, - we have connected the markers and clicked on one of them. + Our application has buttons for adding or removing a series in a chart and a button to connect or disconnect the legend markers clicked signal to our handler. + In the image above we have connected the markers and clicked on one of them. \snippet ../examples/legendmarkers/mainwidget.cpp 1 - Here we connect the markers in legend to our handler. To avoid connecting same marker more than once, we first disconnect it. + Here we connect the markers in the legend to our handler. To avoid connecting the same marker more than once, we first disconnect it. \snippet ../examples/legendmarkers/mainwidget.cpp 2 @@ -21,21 +21,21 @@ \snippet ../examples/legendmarkers/mainwidget.cpp 3 - In our handler we first cast the sender of event to QLegendMarker. + In our handler we first cast the sender of the event to the QLegendMarker. \snippet ../examples/legendmarkers/mainwidget.cpp 4 - Then we check the type of marker. This is needed if we want to access the detailed methods of the marker and cast it to correct type. - If all we need is the pointer to QAbstractSeries, the casting isn't necessary. In case of pie or bar series, we may need the pointer to related QPieSlice or QBarSet. + Then we check the type of the marker. This is required if we want to access the detailed methods of the marker and cast it to the correct type. + If all we need is the pointer to QAbstractSeries, the casting isn't necessary. In case of a pie or bar series, we may need the pointer to a related QPieSlice or QBarSet. \snippet ../examples/legendmarkers/mainwidget.cpp 5 - We want to toggle the visibility of the series, when marker is clicked. To do so, we get the pointer to related series from marker and toggle its visibility. - Because the legend marker follows the visibility of the series by default, we also set the marked back to visible. If we don't do that, the marker will be - invisible in legend and we can't click on it anymore. + We want to toggle the visibility of the series, when the marker is clicked. To do so, we get the pointer to a related series from the marker and toggle its visibility. + Since the legend marker follows the visibility of the series by default, we also set the marked back to visible. If we don't do so, the marker will be + invisible in the legend and we can't click on it anymore. \snippet ../examples/legendmarkers/mainwidget.cpp 6 - Instead of making marker invisible when series is hidden, we dim the color of the marker. Here we do it by modifying the color of the laberBrush. + Instead of making the marker invisible when the series is hidden, we dim the color of the marker. Here we do it by modifying the color of the laberBrush. */ diff --git a/doc/src/examples-lineandbarchart.qdoc b/doc/src/examples-lineandbarchart.qdoc index efe0c9c..3ef6615 100644 --- a/doc/src/examples-lineandbarchart.qdoc +++ b/doc/src/examples-lineandbarchart.qdoc @@ -3,32 +3,32 @@ \title Line and BarChart Example \subtitle - The example shows how to combine different charts and set the axes. In the example we combine linechart with - barchart and use category axis as common axis for both. + The example shows how to combine different charts and set the axes. In the example we combine a linechart with + a barchart and use the category axis as a common axis for both. \image examples_lineandbar.png - Here we create data for our barseries. + Here we create data for our bar series. \snippet ../examples/lineandbar/main.cpp 1 - We create the barseries and append the sets to it. - First values of each set are grouped together at first category second value to second category and so on. + We create a bar series and append sets to it. + The first values of each set are grouped together in the first category, the second values in the second category and so on. \snippet ../examples/lineandbar/main.cpp 2 - Then we create lineseries and add data to it. To make data match with barchart we use index as an x-value for our line series, so that - first point is at (0,value) second at (1,value) and so on. - - \snippet ../examples/lineandbar/main.cpp 8 - + Then we create a line series and add data to it. To make the data match with the barchart, we use the index as an x-value for our line series, so that + first point is at (0,value) second at (1,value) and so on. + + \snippet ../examples/lineandbar/main.cpp 8 + Here we create the chart and add both series to it. \snippet ../examples/lineandbar/main.cpp 3 - - To make chart show series properly, we have to create custom axes for series. If we don't create custom axes, then each series will get scaled to - use maximum area of the chart (like in single series case) and result will be incorrect. With custom axes we set the range of both series to follow same - axis. For x-axis we use QBarCategoryAxis and for y-axis we use QValuesAxis. + + To make the chart show the series properly, we have to create custom axes for the series. If we don't create custom axes, then each series will get scaled to + use the maximum area of the chart (like in single series case) and the result will be incorrect. With custom axes we set the range of both series to follow the + same axis. For the x-axis we use the QBarCategoryAxis and for the y-axis we use QValuesAxis. \snippet ../examples/lineandbar/main.cpp 4 @@ -40,7 +40,7 @@ \snippet ../examples/lineandbar/main.cpp 6 - And it is ready to be shown in a window. + Now it is ready to be shown in a window. \snippet ../examples/lineandbar/main.cpp 7 */ diff --git a/doc/src/examples-linechart.qdoc b/doc/src/examples-linechart.qdoc index cc799ca..a126295 100644 --- a/doc/src/examples-linechart.qdoc +++ b/doc/src/examples-linechart.qdoc @@ -3,28 +3,28 @@ \title LineChart Example \subtitle - The example shows how to create simple line chart. + The example shows how to create a simple line chart. \image examples_linechart.png - - To create line chart, QLineSeries instance is needed. Let's create one. + + To create a line chart, a QLineSeries instance is needed. Let's create one. \snippet ../examples/linechart/main.cpp 1 - Then we add data to series. We can use append() member function or use stream operator. + Then we add data to the series. We can use the append() member function or use the stream operator. \snippet ../examples/linechart/main.cpp 2 - To present the data on the chart we need QChart instance. We add the series to it, create the default axes and set the title of the chart. + To present the data on the chart we need a QChart instance. We add the series to it, create the default axes, and set the title of the chart. \snippet ../examples/linechart/main.cpp 3 - Then we create a QChartView object with QChart as a parameter. This way we don't need to create QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. - - \snippet ../examples/linechart/main.cpp 4 + Then we create a QChartView object with QChart as a parameter. This way we don't need to create a QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. + + \snippet ../examples/linechart/main.cpp 4 - Chart is ready to be shown. + The chart is ready to be shown. \snippet ../examples/linechart/main.cpp 5 - + */ diff --git a/doc/src/examples-logvalueaxis.qdoc b/doc/src/examples-logvalueaxis.qdoc index 27449c4..82e6a03 100644 --- a/doc/src/examples-logvalueaxis.qdoc +++ b/doc/src/examples-logvalueaxis.qdoc @@ -1,17 +1,17 @@ /*! \example examples/logvalueaxis - \title Logarithmic axis example + \title Logarithmic Axis Example \subtitle The example shows how to use QLogValueAxis. \image examples_logvalueaxis.png - - Create QLineSeries instance and add some data to it. + + Create a QLineSeries instance and add some data to it. \snippet ../examples/logvalueaxis/main.cpp 1 - To present the data on the chart we need QChart instance. Add the series to it, hide the legend and set the title of the chart. + To present the data on the chart we need a QChart instance. Add the series to it, hide the legend and set the title of the chart. \snippet ../examples/logvalueaxis/main.cpp 2 @@ -19,12 +19,12 @@ \snippet ../examples/logvalueaxis/main.cpp 3 - Then create a QChartView object with QChart as a parameter. Enable antialiasing to have the rendered line look nicer. - - \snippet ../examples/logvalueaxis/main.cpp 4 + Then create a QChartView object with QChart as a parameter. Enable antialiasing to have the rendered line look nicer. + + \snippet ../examples/logvalueaxis/main.cpp 4 - Chart is ready to be shown. + The chart is ready to be shown. \snippet ../examples/logvalueaxis/main.cpp 5 - + */ diff --git a/doc/src/examples-modeldata.qdoc b/doc/src/examples-modeldata.qdoc index cc13fa9..e8f6655 100644 --- a/doc/src/examples-modeldata.qdoc +++ b/doc/src/examples-modeldata.qdoc @@ -1,51 +1,52 @@ /*! \example examples/modeldata - \title Model data example + \title Model Data Example \subtitle - This example shows how to use QAbstractItemModel derived model as the data for the series. + This example shows how to use the QAbstractItemModel derived model as the data for the series. \image examples_modeldata.png - Let's start by creating an instance of CustomTableModel class. - CustomTableModel class is derived from QAbstractTableModel and it was created for the purpose of this example. - The constructor of this class populates the internal data store of the model with the data that is good for our chart example. + Let's start by creating an instance of the CustomTableModel class. + The CustomTableModel class is derived from QAbstractTableModel and it was created for the purpose of this example. + The constructor of this class populates the internal data store of the model with the data that is suitable for our chart example. \snippet ../examples/modeldata/tablewidget.cpp 1 We now have a model with data that we would like to display both on the chart and in a QTableView. - First, we create QTableView and tell it use the model as a data source. To make the data cells fill the table view we also change headers resize mode. + First, we create QTableView and tell it to use the model as a data source. To make the data cells fill the table view we also change headers resize mode. \snippet ../examples/modeldata/tablewidget.cpp 2 - Now we need QChart instance to display the same data on the chart. + Now we need the QChart instance to display the same data on the chart. We also enable animations. It makes it easier to see how modifying the model's data affect the chart. \snippet ../examples/modeldata/tablewidget.cpp 3 - The code below creates new line series and gives it a name. Following line creates an instance of QVXYModelMapper class. - Next two lines specifie that x coordinates are taken from the model's column(Qt::Vertical) with index 0 and the y coordinates are taken from the model's column with index 1. + The code below creates new line series and gives it a name. The following line creates an instance of QVXYModelMapper class. + The next two lines specify that X-coordinates are taken from the model's column(Qt::Vertical) with index 0. The Y-coordinates are taken from the model's column with index 1. To create a connection between the series and the model we set both of those objects to QVXYModelMapper. - Finally the series is added to the chart. + Finally, the series is added to the chart. \snippet ../examples/modeldata/tablewidget.cpp 4 To show in QTableView which data corresponds with which series this example uses table coloring. - When series is added to the chart it is assigned a color based on the currently selected theme. - Code below extracts that color from the series and uses it to create colored QTableView. - Coloring of the view is not a part of the QChart functionality. + When a series is added to the chart it is assigned a color based on the currently selected theme. + The code below extracts that color from the series and uses it to create a colored QTableView. + The coloring of the view is not a part of the QChart functionality. \snippet ../examples/modeldata/tablewidget.cpp 5 - The same operations are done with second series. Notice that for this series different columns of the same model are mapped. + The same operations are done with a second series. Notice that for this series different columns of the same model are mapped. \snippet ../examples/modeldata/tablewidget.cpp 6 \snippet ../examples/modeldata/tablewidget.cpp 7 - To avoid setting up the QGraphicsScene we use QChartView class that does it for us. QChart object pointer is used as a parameter of the QChartView constructor. - To make the render look nicer Antialiasing is turned on and the minimum size of the chartView widget is set. + To avoid setting up the QGraphicsScene we use the QChartView class that does it for us. + QChart object pointer is used as a parameter of the QChartView constructor. + To make the chart look nicer, Antialiasing is turned on and the minimum size of the chartView widget is set. \snippet ../examples/modeldata/tablewidget.cpp 8 @@ -53,5 +54,5 @@ \snippet ../examples/modeldata/tablewidget.cpp 9 - Application is ready. Try modifying the data in the table view and see how it affects the chart. + The application is ready. Try modifying the data in the table view and see how it affects the chart. */ diff --git a/doc/src/examples-multiaxis.qdoc b/doc/src/examples-multiaxis.qdoc index e490056..4407c90 100644 --- a/doc/src/examples-multiaxis.qdoc +++ b/doc/src/examples-multiaxis.qdoc @@ -1,36 +1,36 @@ /*! \example examples/multiaxis - \title Multiple axes example + \title Multiple Axes Example \subtitle - The example shows how to create simple chart with two vertical axes. One for each series. + The example shows how to create a simple chart with two vertical axes. One for each series. \image examples_multiaxis.png - - Create QChart instance, hide the legend of the chart and set its title. + + Create the QChart instance, hide the legend of the chart, and set its title. \snippet ../examples/multiaxis/main.cpp 1 Create a QValueAxis instance that will be used as a horizontal axis by both series and add it the bottom of the chart. - Axis can be sharted between many series, but each series can have only one vertical and horizontal axis. + The axis can be shared between many series, but each series can have only one vertical and horizontal axis. \snippet ../examples/multiaxis/main.cpp 2 - Create the first series, add the data to it, finally add the series to the chart. Instantiate its own Y-axis, add it to the chart then attach both the common X-axis and the series specific Y-axis. + Create the first series, and add the data to it. Finally, add the series to the chart. Instantiate its own Y-axis, add it to the chart. Then attach both the common X-axis and the series specific Y-axis. In this example the color of the axis line is set to be the same as the color of the series to make it possible to distinguish which axis is attached to which series. \snippet ../examples/multiaxis/main.cpp 3 - Similarly prepare another series. This time different axis type is used. Additionally grid lines color is also set to be the same as the color of the series. - + Similarly prepare another series. This time a different axis type is used. Additionally grid lines color is also set to be the same as the color of the series. + \snippet ../examples/multiaxis/main.cpp 4 Create a QChartView object with QChart as a parameter. Enable Antialiasing to have the rendered splines look nicer. - + \snippet ../examples/multiaxis/main.cpp 5 - Chart is ready to be shown. + The chart is ready to be shown. \snippet ../examples/multiaxis/main.cpp 6 - + */ diff --git a/doc/src/examples-percentbarchart.qdoc b/doc/src/examples-percentbarchart.qdoc index 40dc97c..2b64f82 100644 --- a/doc/src/examples-percentbarchart.qdoc +++ b/doc/src/examples-percentbarchart.qdoc @@ -3,42 +3,42 @@ \title PercentBarChart Example \subtitle - The example shows how to create simple percent bar chart. Percent bar chart shows the data in set as percentage of - all sets, per category. - - Creating percent bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a - percent bar chart, we use QPercentBarSeries api instead of QBarSeries. Also, in the - \l {BarChart Example} {bar chart} we used nice numbers algorithm to make the y axis numbering look better. With - percent bar chart there is no need for that, because the maximum y-axis value is always 100. - + The example shows how to create a simple percent bar chart. A percent bar chart shows the data in sets as a percentage of + all sets per category. + + Creating percent bar charts is just like creating a regular \l {BarChart Example} {bar chart}, except that for a + percent bar charts, we use the QPercentBarSeries api instead of QBarSeries. Also, in the + \l {BarChart Example} {bar chart} we used the nice numbers algorithm to make the y-axis numbering look better. With + the percent bar chart there is no need for that, because the maximum y-axis value is always 100. + \image examples_percentbarchart.png The barsets are used in same way in all barcharts. - To illustrate difference between various barcharts, we use same data in examples. - Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data - to them. The data is appended here with << operator. Alternatively the append method could be used. + To illustrate the difference between various barcharts, we use the same data in all examples. + The data visualized by the bar chart is defined by QBarSet instances. Here we create the sets and append data + to them. The data is appended here with the << operator. Alternatively the append method could be used. \snippet ../examples/percentbarchart/main.cpp 1 We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. - First values of each set are grouped together at first category second value to second category and so on. + The first values of each set are grouped together in the first category, the second values in the second category etc. \snippet ../examples/percentbarchart/main.cpp 2 - Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + Here we create the chart object and add the series to it. We set the title of the chart with setTitle, and then turn on animations of the series by calling + setAnimationOptions(QChart::SeriesAnimations) \snippet ../examples/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 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 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. \snippet ../examples/percentbarchart/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do so, we get the legend pointer from the chart and set it to visible. We also place the legend to bottom of + the chart by setting its alignment to Qt::AlignBottom. \snippet ../examples/percentbarchart/main.cpp 5 @@ -46,8 +46,8 @@ \snippet ../examples/percentbarchart/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + The chart is ready to be shown. We set the chart to be central widget of the window. + We also set the size for the chart window and show it. - \snippet ../examples/percentbarchart/main.cpp 7 + \snippet ../examples/percentbarchart/main.cpp 7 */ diff --git a/doc/src/examples-piechart.qdoc b/doc/src/examples-piechart.qdoc index bcda7d4..c0b1ee6 100644 --- a/doc/src/examples-piechart.qdoc +++ b/doc/src/examples-piechart.qdoc @@ -3,6 +3,6 @@ \title Piechart Example \subtitle - The example shows how to create simple pie chart and do some customizations to a pie slice. + The example shows how to create a simple pie chart and do some customizations to a pie slice. \image examples_piechart.png */ diff --git a/doc/src/examples-piechartdrilldown.qdoc b/doc/src/examples-piechartdrilldown.qdoc index 5d37290..3339187 100644 --- a/doc/src/examples-piechartdrilldown.qdoc +++ b/doc/src/examples-piechartdrilldown.qdoc @@ -1,6 +1,6 @@ /*! \example examples/piechartdrilldown - \title Piechart drilldown example + \title Piechart Drilldown Example \subtitle The example shows how to implement a piechart with drilldown effect. diff --git a/doc/src/examples-polarchart.qdoc b/doc/src/examples-polarchart.qdoc index d9f976d..ddda8e7 100644 --- a/doc/src/examples-polarchart.qdoc +++ b/doc/src/examples-polarchart.qdoc @@ -1,15 +1,15 @@ /*! \example examples/polarchart - \title Polar chart example + \title Polar Chart Example \subtitle - The example shows how to create simple polar chart with multiple different series. + The example shows how to create a simple polar chart with multiple different series. It also shows how to implement scrolling and zooming of the polar chart as well as - visually demonstrate how polar chart and cartesian chart relate to each other. + visually demonstrate how polar charts and cartesian charts relate to each other. \image examples_polarchart.png - Creating polar chart is done via QPolarChart instance instead of QChart. + Creating a polar chart is done with a QPolarChart instance instead of a QChart instance. \snippet ../examples/polarchart/main.cpp 1 @@ -18,15 +18,15 @@ \snippet ../examples/polarchart/main.cpp 2 - Zooming and scrolling of the polar chart is logically nearly identical to zooming and scrolling of cartesian chart. - The main difference is that when scrolling along X-axis (angular axis), angle is used instead of number of pixels. + Zooming and scrolling of a polar chart is logically nearly identical to zooming and scrolling of a cartesian chart. + The main difference is that when scrolling along the X-axis (angular axis), the angle is used instead of the number of pixels. Another difference is that zooming to a rectangle cannot be done. \snippet ../examples/polarchart/chartview.cpp 1 - Same axes and series can be used in both cartesian and polar charts, though not simultaneously. - To switch between chart types, you need to first remove series and axes from the old chart and then add - them to the new chart. If you want to preserve axis ranges, those need to be copied, too. + The same axes and series can be used in both cartesian and polar charts, though not simultaneously. + To switch between chart types, you first need to remove the series and axes from the old chart, and then add + them to the new chart. If you want to preserve the axis ranges, those need to be copied, too. \snippet ../examples/polarchart/chartview.cpp 2 diff --git a/doc/src/examples-scatterchart.qdoc b/doc/src/examples-scatterchart.qdoc index eaa72c8..44296b8 100644 --- a/doc/src/examples-scatterchart.qdoc +++ b/doc/src/examples-scatterchart.qdoc @@ -3,25 +3,25 @@ \title ScatterChart Example \subtitle - The example shows how to create simple scatter chart. + The example shows how to create a simple scatter chart. \image examples_scatterchart.png - - To create scatter charts, QScatterSeries instance is needed. Here we create scatter series instance and we set the type, color and width of outline for scatter points. + + To create scatter charts, a QScatterSeries instance is needed. Here we create a scatter series instance, and set the type, color, and width of outline for the scatter points. \snippet ../examples/scatterchart/chartview.cpp 1 - We add data to be shown. We can use append() member function or use stream operator. + We add the data to be shown. We can use the append() member function or use the stream operator. \snippet ../examples/scatterchart/chartview.cpp 2 - In the end we enable anti-aliasing, set the chart title and add the scatter series onto the chart. We also disable + In the end we enable anti-aliasing, set the chart title, and add the scatter series onto the chart. We also disable drop shadow, because it would not look good on an application with only chart view shown. \snippet ../examples/scatterchart/chartview.cpp 3 - - Chart is ready to be shown. - + + The chart is ready to be shown. + \snippet ../examples/scatterchart/main.cpp 4 - + */ diff --git a/doc/src/examples-scatterinteractions.qdoc b/doc/src/examples-scatterinteractions.qdoc index ec975b3..12625e3 100644 --- a/doc/src/examples-scatterinteractions.qdoc +++ b/doc/src/examples-scatterinteractions.qdoc @@ -3,7 +3,7 @@ \title ScatterInteractions Example \subtitle - The example shows how to create simple scatter chart and how to interact with the chart. + This example shows how to create a simple scatter chart and how to interact with the chart. \image examples_scatterinteractions.png */ diff --git a/doc/src/examples-splinechart.qdoc b/doc/src/examples-splinechart.qdoc index c584570..c5308b9 100644 --- a/doc/src/examples-splinechart.qdoc +++ b/doc/src/examples-splinechart.qdoc @@ -3,27 +3,27 @@ \title SplineChart Example \subtitle - The example shows how to create simple spline chart. + The example shows how to create a simple spline chart. \image examples_splinechart.png - - To create spline chart we need to put our data into QSplineSeries. QSplineSeries automatically calculates spline segment control points that are needed to properly draw the spline. + + To create spline charts we need to put our data into QSplineSeries. QSplineSeries automatically calculates spline segment control points that are needed to properly draw the spline. \snippet ../examples/splinechart/main.cpp 1 Now let's add some data points to the series. - - \snippet ../examples/splinechart/main.cpp 2 -The data series has been populated. To display it on a chart we create QChart object and add the data series to it. We also set the title and the values range on y axis, so that our chart is better visible. + \snippet ../examples/splinechart/main.cpp 2 + +The data series has been populated. To display it on a chart we create a QChart object and add the data series to it. We also set the title and the values range on the y-axis, so that our chart's visibility is better. \snippet ../examples/splinechart/main.cpp 3 - -Then we create a QChartView object with QChart as a parameter. This way we don't need to create QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. - - \snippet ../examples/splinechart/main.cpp 4 - - In the end we set the QChartView as the windows's central widget. - - \snippet ../examples/splinechart/main.cpp 5 + +Then we create a QChartView object with QChart as a parameter. This way we don't need to create a QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. + + \snippet ../examples/splinechart/main.cpp 4 + + Finally, we set the QChartView as the windows's central widget. + + \snippet ../examples/splinechart/main.cpp 5 */ diff --git a/doc/src/examples-stackedbarchart.qdoc b/doc/src/examples-stackedbarchart.qdoc index c0410b7..7375b43 100644 --- a/doc/src/examples-stackedbarchart.qdoc +++ b/doc/src/examples-stackedbarchart.qdoc @@ -3,52 +3,49 @@ \title StackedBarChart Example \subtitle - The example shows how to create simple stacked bar chart. Stacked bar chart shows the data in sets as bars that are + The example shows how to create a simple stacked bar chart. The stacked bar chart shows the data in sets as bars stacked on top of each other. The stacking is done per category. - The example shows how to create simple stacked bar chart. Stacked bar chart shows the data in sets as bars that are + The example shows how to create a simple stacked bar chart. Stacked bar chart shows the data in sets as bars that are stacked on top of each other. The stacking is done per category. - Creating stacked bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a - stacked bar chart, we use QStackedBarSeries api instead of QBarSeries. + Creating a stacked bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a + stacked bar chart, we use the QStackedBarSeries api instead of QBarSeries. \image examples_stackedbarchart.png - + The barsets are used in same way in all barcharts. - To illustrate difference between various barcharts, we use same data in examples. - Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data + To illustrate the difference between various barcharts, we use same data in all examples. + Data, which the barchart visualizes, is defined by the QBarSet instances. Here we create the sets and append data to them. The data is appended here with << operator. Alternatively the append method could be used. \snippet ../examples/stackedbarchart/main.cpp 1 We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. - First values of each set are grouped together at first category second value to second category and so on. + The first values of each set are grouped together in the first category, the second values in the second category etc. \snippet ../examples/stackedbarchart/main.cpp 2 - Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + Here we create the chart object and add the series to it. We set the title for the chart with setTitle, and then turn on animations of the series by calling + setAnimationOptions(QChart::SeriesAnimations). \snippet ../examples/stackedbarchart/main.cpp 3 - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. 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 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 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. \snippet ../examples/stackedbarchart/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do so, we get the legend pointer from the chart and set it to visible. We also place the legend to the bottom of the chart by setting its alignment to Qt::AlignBottom. \snippet ../examples/stackedbarchart/main.cpp 5 - Finally we add the chart onto a view. We also turn on the antialiasing for the chartView. + Finally, we add the chart onto a view. We also turn on the antialiasing for the chartView. \snippet ../examples/stackedbarchart/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + The chart is ready to be shown. We set the chart to be the central widget of the window. + We also set the size for the chart window and show it. \snippet ../examples/stackedbarchart/main.cpp 7 */ - - diff --git a/doc/src/examples-stackedbarchartdrilldown.qdoc b/doc/src/examples-stackedbarchartdrilldown.qdoc index 655e08e..f9a5dea 100644 --- a/doc/src/examples-stackedbarchartdrilldown.qdoc +++ b/doc/src/examples-stackedbarchartdrilldown.qdoc @@ -3,43 +3,43 @@ \title StackedBarChart Drilldown Example \subtitle - The example shows how to implement drilldown using stacked barchart. In drilldown example we create stacked barchart, which shows the harvest of various chili peppers during season. In season view the harvest is grouped by month. To drill down to weekly view, user clicks selected month with right mouse button. On weekly view, the harvest of clicked month is shown by week. For example purposes each month is 4 weeks long :) + The example shows how to implement drilldown using a stacked barchart. In thedrilldown example we create a stacked bar chart, which shows the harvest of various chili peppers during season. In season view the harvest is grouped by month. To drill down to weekly view, right-click the selected month. On weekly view, the harvest of the month clicked is shown by week. - Season view looks like this: + The season view looks like this: \image examples_stackedbarchartdrilldown1.png - Mouse button clicked on a month, shows the harvest from that month: + Clicking on a month shows that month's harvest: \image examples_stackedbarchartdrilldown2.png - First we define a drilldown series class, which adds categories to stacked bar series and mapping for categories to other drilldown series. - Purpose of drilldown series is to contain knowledge of the drilldown structure. The mapDrilldownSeries function maps the category to given series. We can ask the mapping for category with drilldownSeries(int category) function. + First we define a drilldown series class, which adds categories to the stacked bar series and mapping for categories to other drilldown series. + The purpose of the drilldown series is to contain knowledge of the drilldown structure. The mapDrilldownSeries function maps the category to a given series. We can request the mapping for a category with the drilldownSeries(int category) function. \snippet ../examples/stackedbarchartdrilldown/drilldownseries.h 1 - Next we define our own drilldown chart, which implements handler for mouse click. All QBarSeries derived classes send out clicked(QBarSet*, int) signal when series is clicked with mouse. The parameter QBarSet contains pointer to clicked bar set and parameter int contains the index of clicked category. + Next we define our own drilldown chart, which implements the handler for the mouse click. All QBarSeries derived classes send out the clicked(QBarSet*, int) signal when a series is clicked with the mouse. The parameter QBarSet contains the pointer to the clicked bar set and parameter int contains the index of the clicked category. \snippet ../examples/stackedbarchartdrilldown/drilldownchart.h 1 - Now we have our drilldown classes and we can start using them. - First create the chart. + Now we have our drilldown classes and we can start using them. + First create the chart. \snippet ../examples/stackedbarchartdrilldown/main.cpp 1 - We define categories, from which the drilldown series will be constructed. + We define the categories from which the drilldown series will be constructed. \snippet ../examples/stackedbarchartdrilldown/main.cpp 2 - To create the drilldown structure, we first create our top level series, which we call seasonSeries. For each month in seasonSeries we create a drilldown series, called weeklySeries which contains more detailed data for that month. - In weeklySeries, we use the drilldown handler to bring us back to seasonSeries. To do this we add mapping to the series. The seasonSeries is mapped to weeklySeries for each month. Every weeklySeries is mapped back to the seasonSeries. + To create the drilldown structure, we first create our top level series, which we call seasonSeries. For each month in seasonSeries we create a drilldown series called weeklySeries which contains more detailed data for that month. + In weeklySeries, we use the drilldown handler to bring us back to seasonSeries. To do so we add mapping to the series. The seasonSeries is mapped to weeklySeries for each month. Every weeklySeries is mapped back to the seasonSeries. To make mapping work, we connect the clicked signals from our series to the drilldownChart. \snippet ../examples/stackedbarchartdrilldown/main.cpp 3 - When we have our drilldown structure ready, we can add the data to it. Here we generate random crop for each plant in each week. The monthly crop is calculated from weekly crops and is set as value to monthly series. + When we have our drilldown structure ready, we can add the data to it. Here we generate a random crop for each plant in each week. The monthly crop is calculated from weekly crops and is set as value to the monthly series. \snippet ../examples/stackedbarchartdrilldown/main.cpp 4 - Here we set the chart to show top level series initially. + Here we set the chart to show the top level series initially. \snippet ../examples/stackedbarchartdrilldown/main.cpp 5 */ diff --git a/doc/src/examples-temperaturerecords.qdoc b/doc/src/examples-temperaturerecords.qdoc index 95961a7..50422d5 100644 --- a/doc/src/examples-temperaturerecords.qdoc +++ b/doc/src/examples-temperaturerecords.qdoc @@ -3,33 +3,33 @@ \title Temperature records example \subtitle - The example shows how to create a bar chart with negative bars. For example purposes we use temperature data. + The example shows how to create a bar chart with negative bars. For our example we use temperature data. \image examples_temperaturerecords.png - First we create two barsets and append the data to them. One set represents the minimum temperatures and another maximum temperatures. - + First we create two barsets and append the data to them. One set represents the minimum temperatures and another the maximum temperatures. + \snippet ../examples/temperaturerecords/main.cpp 1 - We create the series and append the barsets to it. The series takes ownership of the barsets. + We create the series and append the barsets to it. The series takes ownership of the barsets. \snippet ../examples/temperaturerecords/main.cpp 2 - Here we create the chart object and add the series to it. We set the title for chart with setTitle and then turn on animations of the series by calling - setAnimationOptions(QChart::SeriesAnimations) + Here we create the chart object and add the series to it. We set the title for the chart with setTitle, and then turn on animations of the series by calling + setAnimationOptions(QChart::SeriesAnimations) \snippet ../examples/temperaturerecords/main.cpp 3 - - To have categories displayed on axis, we need to create a QBarCategoryAxis for that. 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 axis. For y-axis we use default axis, which is created and scaled to series data - by calling createDefaultAxes of the chart. We change the range for y-axis, since in this case it gives nicer result than 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 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. \snippet ../examples/temperaturerecords/main.cpp 4 - We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment - to Qt::AlignBottom. + We also want to show the legend. To do so, we get the legend pointer from the chart and set it to visible. We also place the legend to the bottom + of the chart by setting its alignment to Qt::AlignBottom. \snippet ../examples/temperaturerecords/main.cpp 5 @@ -37,8 +37,8 @@ \snippet ../examples/temperaturerecords/main.cpp 6 - Chart is ready to be shown. We set the chart to be central widget of the window. - We also set the size for the chart window and show it. + Chart is ready to be shown. We set the chart to be the central widget of the window. + We also set the size for the chart window and show it. \snippet ../examples/temperaturerecords/main.cpp 7 */ diff --git a/doc/src/examples-zoomlinechart.qdoc b/doc/src/examples-zoomlinechart.qdoc index 9aee558..1bdf2f7 100644 --- a/doc/src/examples-zoomlinechart.qdoc +++ b/doc/src/examples-zoomlinechart.qdoc @@ -1,6 +1,6 @@ /*! \example examples/zoomlinechart - \title Zoom line example + \title Zoom Line Example \subtitle The example shows how to create your own custom zooming effect with QRubberBand by using a mouse @@ -17,7 +17,7 @@ We override mouse and key event handling \snippet ../examples/zoomlinechart/chartview.h 2 - Then we implement a custom logic for mouse and key events. For example pressing '+' key will zoom in and pressing + Then we implement a custom logic for mouse and key events. For example pressing the '+' key will zoom in and pressing the '-' key will zoom out. \snippet ../examples/zoomlinechart/chartview.cpp 1 diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc index a2c5e62..c814f8c 100644 --- a/doc/src/examples.qdoc +++ b/doc/src/examples.qdoc @@ -2,7 +2,7 @@ \page examples.html \title Qt Charts Examples \keyword Examples - + \raw HTML
    @@ -119,12 +119,12 @@ Spline Chart Stacked Bar Chart - + Spline Chart Stacked Bar Chart - + Stacked Bar Chart Drilldown Temperature Records diff --git a/doc/src/gettingstarted.qdoc b/doc/src/gettingstarted.qdoc index 811606a..0aa8a9d 100644 --- a/doc/src/gettingstarted.qdoc +++ b/doc/src/gettingstarted.qdoc @@ -1,6 +1,6 @@ /*! \page gettingstarted.html - \title Qt Charts getting started + \title Qt Charts Getting Started \keyword Introduction Compiling: @@ -10,7 +10,7 @@ make install \endcode - Depending on the OS and the compiler you are using "make" might need to be replaced with another command like: nmake, mingw32-make, etc. + Depending on the OS and the compiler you are using, "make" might need to be replaced with another command like: nmake, mingw32-make, etc. To uninstall the Qt Charts run: \code @@ -31,7 +31,7 @@ make install \endcode - Please take a note that the \i build_all option is necessary for the install to work correctly. Otherwise it will not install both versions. + Please note that the \i build_all option is necessary for the install to work correctly. Otherwise it will not install both versions. Building without demos and examples: \code @@ -69,5 +69,5 @@ \raw HTML \endraw - + */ diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 31beaee..1a3a9ae 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -7,10 +7,10 @@ qt-logo

    - Qt Charts is a part of Qt Enterprise addons package. It provides a set of easy to use chart - components which are available for Qt customers. It uses Qt Graphics View + 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 Framework, therefore charts can be easily integrated to modern user interfaces. Qt Charts can - be used as QWidgets, QGraphicsWidget or QML elements. Users can easily create impressive + be used as QWidgets, QGraphicsWidget, or QML elements. Users can easily create impressive graphs by selecting one of the charts themes.

    diff --git a/doc/src/qml.qdoc b/doc/src/qml.qdoc index 076db5f..8bc9046 100644 --- a/doc/src/qml.qdoc +++ b/doc/src/qml.qdoc @@ -3,7 +3,7 @@ \title Qt Charts QML API \keyword Charts QML API - Qt Charts QML API is an intuitive and simple way to show charts in your QML + The Qt Charts QML API is an intuitive and simple way to show charts in your QML applications. \table @@ -21,9 +21,9 @@ \note Since Qt Charts utilizes Qt Graphics View Framework for drawing, it works best with Qt Quick 1, which is based on the same framework. As of release 1.3.0, Qt Charts is also usable with Qt Quick 2, though the performance - is slightly worse than with Qt Quick 1 due to additional rendering step that is required. + is slightly worse than with Qt Quick 1 due to the additional rendering step that is required. - \note Qt Quick 1 is supported from Qt 4.7.4 onwards because of missing + \note Qt Quick 1 is supported from Qt 4.7.4 onwards because of the missing Q_REVISION macro in the earlier Qt releases. Qt Quick 2 is supported with only Qt 5. \raw HTML diff --git a/doc/src/tutorials.qdoc b/doc/src/tutorials.qdoc index e6a649d..945d7ac 100644 --- a/doc/src/tutorials.qdoc +++ b/doc/src/tutorials.qdoc @@ -2,5 +2,5 @@ \page tutorials.html \title Tutorials \keyword Tutorials - + */ diff --git a/plugins/declarative/font.qdoc b/plugins/declarative/font.qdoc index a9ea363..09728d9 100644 --- a/plugins/declarative/font.qdoc +++ b/plugins/declarative/font.qdoc @@ -14,8 +14,8 @@ Sets the family name of the font. The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]". - If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen. - If the family isn't available a family will be set using the font matching algorithm. + If the family is available from more than one foundry, and the foundry isn't specified, an arbitrary foundry is chosen. + If the family isn't available, a family will be set using the font matching algorithm. */ /*! @@ -46,19 +46,19 @@ /*! \qmlproperty bool Font::italic - Sets whether the font has an italic style. + Sets on or off the italic style property. */ /*! \qmlproperty bool Font::underline - Sets whether the text is underlined. + Sets on or off the underlined property. */ /*! \qmlproperty bool Font::strikeout - Sets whether the font has a strikeout style. + Sets on or off the strikeout style. */ /*! @@ -102,9 +102,9 @@ \list \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied. - \o Font.AllUppercase - This alters the text to be rendered in all uppercase type. - \o Font.AllLowercase - This alters the text to be rendered in all lowercase type. - \o Font.SmallCaps - This alters the text to be rendered in small-caps type. + \o Font.AllUppercase - Changes the text to uppercasse. + \o Font.AllLowercase - Changes the text to lowercase. + \o Font.SmallCaps - Renders the text small-caps type. \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. \endlist