summaryrefslogtreecommitdiffstats
path: root/src/charts/doc/src/examples-customchart.qdoc
blob: 28b1adbfa4ed3f4844b5b64aa0d2a4c4767449a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.io
**
** This file is part of the Qt Charts module.
**
** Licensees holding valid commercial license for Qt may use this file in
** accordance with the Qt License Agreement provided with the Software
** or, alternatively, in accordance with the terms contained in a written
** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.io
**
****************************************************************************/

/*!
    \example customchart
    \title Custom Chart Example
    \ingroup qtcharts_examples

    \brief This example shows how to customize the appearance of the different elements on a chart.
    \image examples_customchart.png

    We begin by creating a simple line series and a chart object.
    \snippet customchart/main.cpp 1

    First we customize the series and the chart's title and background.
    \snippet customchart/main.cpp 2

    Then we customize the axes.
    \snippet customchart/main.cpp 3

    Then the axis label values and ranges. Once the axes are ready, we set them to be used by the chart.
    \snippet customchart/main.cpp 4

    Finally, we create a view containing the chart.
    \snippet customchart/main.cpp 5

    Now we are ready to show the chart on a main window.
    \snippet customchart/main.cpp 6
*/