##// END OF EJS Templates
Documenting xy-series
Tero Ahola -
r1491:abdb70920d73
parent child
Show More
@@ -9,11 +9,6
9 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 2
9 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 2
10 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 3
10 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 3
11
11
12 \beginfloatleft
13 \image examples_qmlpiechart.png
14 \endfloat
15 \clearfloat
16
17 \raw HTML
12 \raw HTML
18 <table cellpadding="2" cellspacing="1" border="0" width="95%" class="indextable">
13 <table cellpadding="2" cellspacing="1" border="0" width="95%" class="indextable">
19 <tr>
14 <tr>
@@ -25,20 +25,6
25
25
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27
27
28 /*!
29 \qmlclass AreaSeries QAreaSeries
30
31 \section1 Example Usage
32
33 \beginfloatleft
34 \image demos_qmlchart4.png
35 \endfloat
36 \clearfloat
37
38 The following QML shows how to create a simple area chart:
39 \snippet ../demos/qmlchart/qml/qmlchart/View4.qml 1
40 */
41
42 DeclarativeAreaSeries::DeclarativeAreaSeries(QObject *parent) :
28 DeclarativeAreaSeries::DeclarativeAreaSeries(QObject *parent) :
43 QAreaSeries(parent)
29 QAreaSeries(parent)
44 {
30 {
@@ -34,11 +34,13 QTCOMMERCIALCHART_BEGIN_NAMESPACE
34
34
35 ChartView element is the parent that is responsible for showing different chart series types.
35 ChartView element is the parent that is responsible for showing different chart series types.
36
36
37 The following QML shows how to create a simple line chart:
37 The following QML shows how to create a simple chart with one pie series:
38 \snippet ../demos/qmlchart/qml/qmlchart/View2.qml 1
38 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 1
39 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 2
40 \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 3
39
41
40 \beginfloatleft
42 \beginfloatleft
41 \image demos_qmlchart2.png
43 \image examples_qmlpiechart.png
42 \endfloat
44 \endfloat
43 \clearfloat
45 \clearfloat
44 */
46 */
@@ -25,18 +25,6
25
25
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27
27
28 /*!
29 \qmlclass LineSeries QLineSeries
30
31 \beginfloatleft
32 \image demos_qmlchart2.png
33 \endfloat
34 \clearfloat
35
36 The following QML shows how to create a simple line chart:
37 \snippet ../demos/qmlchart/qml/qmlchart/View2.qml 1
38 */
39
40 DeclarativeLineSeries::DeclarativeLineSeries(QObject *parent) :
28 DeclarativeLineSeries::DeclarativeLineSeries(QObject *parent) :
41 QLineSeries(parent)
29 QLineSeries(parent)
42 {
30 {
@@ -27,53 +27,6
27
27
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29
29
30 /*!
31 \qmlclass PieSeries QPieSeries
32
33 \section1 Example Usage
34
35 \beginfloatleft
36 \image demos_qmlchart1.png
37 \endfloat
38 \clearfloat
39
40 The following QML shows how to create a simple pie chart.
41
42 \snippet ../demos/qmlchart/qml/qmlchart/View1.qml 1
43 */
44
45 /*!
46 \qmlproperty real PieSeries::horizontalPosition
47 \brief Defines the horizontal position of the pie.
48
49 The value is a relative value to the chart rectangle where:
50
51 \list
52 \o 0.0 is the absolute left.
53 \o 1.0 is the absolute right.
54 \endlist
55
56 Default value is 0.5 (center).
57
58 \sa verticalPosition
59 */
60
61 /*!
62 \qmlproperty real PieSeries::verticalPosition
63 \brief Defines the vertical position of the pie.
64
65 The value is a relative value to the chart rectangle where:
66
67 \list
68 \o 0.0 is the absolute top.
69 \o 1.0 is the absolute bottom.
70 \endlist
71
72 Default value is 0.5 (center).
73
74 \sa horizontalPosition
75 */
76
77 DeclarativePieSeries::DeclarativePieSeries(QObject *parent) :
30 DeclarativePieSeries::DeclarativePieSeries(QObject *parent) :
78 QPieSeries(parent)
31 QPieSeries(parent)
79 {
32 {
@@ -25,19 +25,6
25
25
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27
27
28 /*!
29 \qmlclass ScatterSeries QScatterSeries
30
31 The following QML shows how to create a chart with two simple scatter series:
32 \snippet ../demos/qmlchart/qml/qmlchart/View5.qml 1
33 \snippet ../demos/qmlchart/qml/qmlchart/View5.qml 2
34
35 \beginfloatleft
36 \image demos_qmlchart5.png
37 \endfloat
38 \clearfloat
39 */
40
41 DeclarativeScatterSeries::DeclarativeScatterSeries(QObject *parent) :
28 DeclarativeScatterSeries::DeclarativeScatterSeries(QObject *parent) :
42 QScatterSeries(parent)
29 QScatterSeries(parent)
43 {
30 {
@@ -25,20 +25,6
25
25
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27
27
28 /*!
29 \qmlclass SplineSeries QSplineSeries
30
31 \section1 Example Usage
32
33 \beginfloatleft
34 \image demos_qmlchart3.png
35 \endfloat
36 \clearfloat
37
38 The following QML shows how to create a simple spline chart:
39 \snippet ../demos/qmlchart/qml/qmlchart/View3.qml 1
40 */
41
42 DeclarativeSplineSeries::DeclarativeSplineSeries(QObject *parent) :
28 DeclarativeSplineSeries::DeclarativeSplineSeries(QObject *parent) :
43 QSplineSeries(parent)
29 QSplineSeries(parent)
44 {
30 {
@@ -22,6 +22,23
22
22
23 QTCOMMERCIALCHART_BEGIN_NAMESPACE
23 QTCOMMERCIALCHART_BEGIN_NAMESPACE
24
24
25 /*!
26 \qmlclass XyPoint QPointF
27 XyPoint is a convenience element for initializing XY-series with static coordinate data. To
28 manipulate an XY-series dynamically, use it's data manipulation functions instead.
29 \sa LineSeries, AreaSeries, ScatterSeries, SplineSeries
30 */
31
32 /*!
33 \qmlproperty real XyPoint::x
34 The x-coordinate of the point.
35 */
36
37 /*!
38 \qmlproperty real XyPoint::y
39 The y-coordinate of the point.
40 */
41
25 DeclarativeXyPoint::DeclarativeXyPoint(QObject *parent) :
42 DeclarativeXyPoint::DeclarativeXyPoint(QObject *parent) :
26 QObject(parent)
43 QObject(parent)
27 {
44 {
@@ -69,8 +69,8 public:
69
69
70 qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend",
70 qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend",
71 QLatin1String("Trying to create uncreatable: Legend."));
71 QLatin1String("Trying to create uncreatable: Legend."));
72 qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "QXYSeries",
72 qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries",
73 QLatin1String("Trying to create uncreatable: QXYSeries."));
73 QLatin1String("Trying to create uncreatable: XYSeries."));
74 qmlRegisterUncreatableType<QScatterSeries>(uri, 1, 0, "QScatterSeries",
74 qmlRegisterUncreatableType<QScatterSeries>(uri, 1, 0, "QScatterSeries",
75 QLatin1String("Trying to create uncreatable: QScatterSeries."));
75 QLatin1String("Trying to create uncreatable: QScatterSeries."));
76 qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries",
76 qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries",
@@ -45,29 +45,56 QTCOMMERCIALCHART_BEGIN_NAMESPACE
45 See the \l {AreaChart Example} {area chart example} to learn how to create a simple area chart.
45 See the \l {AreaChart Example} {area chart example} to learn how to create a simple area chart.
46 \image examples_areachart.png
46 \image examples_areachart.png
47 */
47 */
48 /*!
49 \qmlclass AreaSeries QAreaSeries
50
51 The following QML shows how to create a simple area chart:
52 \snippet ../demos/qmlchart/qml/qmlchart/View4.qml 1
53 \beginfloatleft
54 \image demos_qmlchart4.png
55 \endfloat
56 \clearfloat
57 */
48
58
49 /*!
59 /*!
50 \property QAreaSeries::upperSeries
60 \property QAreaSeries::upperSeries
51 \brief The upper one of the two line series used to define area series boundaries.
61 \brief The upper one of the two line series used to define area series boundaries.
52 */
62 */
63 /*!
64 \qmlproperty LineSeries AreaSeries::upperSeries
65 The upper one of the two line series used to define area series boundaries.
66 */
53
67
54 /*!
68 /*!
55 \property QAreaSeries::lowerSeries
69 \property QAreaSeries::lowerSeries
56 The lower one of the two line series used to define are series boundaries. Note if
70 The lower one of the two line series used to define are series boundaries. Note if
57 QAreaSeries was counstucted wihtout a\ lowerSeries this is null.
71 QAreaSeries was counstucted wihtout a\ lowerSeries this is null.
58 */
72 */
73 /*!
74 \qmlproperty LineSeries AreaSeries::lowerSeries
75 The lower one of the two line series used to define are series boundaries. Note if
76 AreaSeries was counstucted wihtout a\ lowerSeries this is null.
77 */
59
78
60 /*!
79 /*!
61 \property QAreaSeries::color
80 \property QAreaSeries::color
62 Fill (brush) color of the series. This is a convenience property for modifying the color of brush.
81 Fill (brush) color of the series. This is a convenience property for modifying the color of brush.
63 \sa QAreaSeries::brush()
82 \sa QAreaSeries::brush()
64 */
83 */
84 /*!
85 \qmlproperty color AreaSeries::color
86 Fill (brush) color of the series.
87 */
65
88
66 /*!
89 /*!
67 \property QAreaSeries::borderColor
90 \property QAreaSeries::borderColor
68 Line (pen) color of the series. This is a convenience property for modifying the color of pen.
91 Line (pen) color of the series. This is a convenience property for modifying the color of pen.
69 \sa QAreaSeries::pen()
92 \sa QAreaSeries::pen()
70 */
93 */
94 /*!
95 \qmlproperty color AreaSeries::borderColor
96 Line (pen) color of the series.
97 */
71
98
72 /*!
99 /*!
73 \fn QPen QAreaSeries::pen() const
100 \fn QPen QAreaSeries::pen() const
@@ -85,29 +112,39 QTCOMMERCIALCHART_BEGIN_NAMESPACE
85 \fn void QAreaSeries::colorChanged(QColor color)
112 \fn void QAreaSeries::colorChanged(QColor color)
86 \brief Signal is emitted when the fill (brush) color has changed to \a color.
113 \brief Signal is emitted when the fill (brush) color has changed to \a color.
87 */
114 */
115 /*!
116 \qmlsignal AreaSeries::colorChanged(color color)
117 Signal is emitted when the fill (brush) color has changed to \a color.
118 */
88
119
89 /*!
120 /*!
90 \fn void QAreaSeries::borderColorChanged(QColor color)
121 \fn void QAreaSeries::borderColorChanged(QColor color)
91 \brief Signal is emitted when the line (pen) color has changed to \a color.
122 \brief Signal is emitted when the line (pen) color has changed to \a color.
92 */
123 */
93
94 /*!
124 /*!
95 \fn bool QAreaSeries::pointsVisible() const
125 \qmlsignal AreaSeries::borderColorChanged(color color)
96 \brief Returns if the points are drawn for this series.
126 Signal is emitted when the line (pen) color has changed to \a color.
97 \sa setPointsVisible()
98 */
127 */
99
128
100 /*!
129 /*!
101 \fn void QAreaSeries::clicked(const QPointF& point)
130 \fn void QAreaSeries::clicked(const QPointF& point)
102 \brief Signal is emitted when user clicks the \a point on area chart.
131 \brief Signal is emitted when user clicks the \a point on area chart.
103 */
132 */
133 /*!
134 \qmlsignal AreaSeries::clicked(QPointF point)
135 Signal is emitted when user clicks the \a point on area chart.
136 */
104
137
105 /*!
138 /*!
106 \fn void QAreaSeries::selected()
139 \fn void QAreaSeries::selected()
107
108 The signal is emitted if the user selects/deselects the XY series. The logic for maintaining selections should be
140 The signal is emitted if the user selects/deselects the XY series. The logic for maintaining selections should be
109 implemented by the user of QAreaSeries API.
141 implemented by the user of QAreaSeries API.
110 */
142 */
143 /*!
144 \qmlsignal AreaSeries::selected()
145 The signal is emitted if the user selects/deselects the XY series. The logic for maintaining selections should be
146 implemented by the user of AreaSeries API.
147 */
111
148
112 /*!
149 /*!
113 \fn void QAreaSeriesPrivate::updated()
150 \fn void QAreaSeriesPrivate::updated()
@@ -256,6 +293,10 void QAreaSeries::setPointsVisible(bool visible)
256 }
293 }
257 }
294 }
258
295
296 /*!
297 Returns if the points are drawn for this series.
298 \sa setPointsVisible()
299 */
259 bool QAreaSeries::pointsVisible() const
300 bool QAreaSeries::pointsVisible() const
260 {
301 {
261 Q_D(const QAreaSeries);
302 Q_D(const QAreaSeries);
@@ -47,6 +47,17 QTCOMMERCIALCHART_BEGIN_NAMESPACE
47 chart->addSeries(series);
47 chart->addSeries(series);
48 \endcode
48 \endcode
49 */
49 */
50 /*!
51 \qmlclass LineSeries QLineSeries
52 \inherits XYSeries
53
54 The following QML shows how to create a simple line chart:
55 \snippet ../demos/qmlchart/qml/qmlchart/View2.qml 1
56 \beginfloatleft
57 \image demos_qmlchart2.png
58 \endfloat
59 \clearfloat
60 */
50
61
51 /*!
62 /*!
52 \fn virtual SeriesType QLineSeries::type() const
63 \fn virtual SeriesType QLineSeries::type() const
@@ -48,36 +48,58 QTCOMMERCIALCHART_BEGIN_NAMESPACE
48 See the \l {PieChart Example} {pie chart example} to learn how to create a simple pie chart.
48 See the \l {PieChart Example} {pie chart example} to learn how to create a simple pie chart.
49 \image examples_piechart.png
49 \image examples_piechart.png
50 */
50 */
51 /*!
52 \qmlclass PieSeries QPieSeries
53
54 The following QML shows how to create a simple pie chart.
55 \snippet ../demos/qmlchart/qml/qmlchart/View1.qml 1
56 \beginfloatleft
57 \image demos_qmlchart1.png
58 \endfloat
59 \clearfloat
60 */
51
61
52 /*!
62 /*!
53 \property QPieSeries::horizontalPosition
63 \property QPieSeries::horizontalPosition
54 \brief Defines the horizontal position of the pie.
64 \brief Defines the horizontal position of the pie.
55
56 The value is a relative value to the chart rectangle where:
65 The value is a relative value to the chart rectangle where:
57
58 \list
66 \list
59 \o 0.0 is the absolute left.
67 \o 0.0 is the absolute left.
60 \o 1.0 is the absolute right.
68 \o 1.0 is the absolute right.
61 \endlist
69 \endlist
62
63 Default value is 0.5 (center).
70 Default value is 0.5 (center).
64
71 \sa verticalPosition
72 */
73 /*!
74 \qmlproperty real PieSeries::horizontalPosition
75 Defines the horizontal position of the pie. The value is a relative value to the chart rectangle where:
76 \list
77 \o 0.0 is the absolute left.
78 \o 1.0 is the absolute right.
79 \endlist
80 Default value is 0.5 (center).
65 \sa verticalPosition
81 \sa verticalPosition
66 */
82 */
67
83
68 /*!
84 /*!
69 \property QPieSeries::verticalPosition
85 \property QPieSeries::verticalPosition
70 \brief Defines the vertical position of the pie.
86 \brief Defines the vertical position of the pie.
71
72 The value is a relative value to the chart rectangle where:
87 The value is a relative value to the chart rectangle where:
73
74 \list
88 \list
75 \o 0.0 is the absolute top.
89 \o 0.0 is the absolute top.
76 \o 1.0 is the absolute bottom.
90 \o 1.0 is the absolute bottom.
77 \endlist
91 \endlist
78
79 Default value is 0.5 (center).
92 Default value is 0.5 (center).
80
93 \sa horizontalPosition
94 */
95 /*!
96 \qmlproperty real PieSeries::verticalPosition
97 Defines the vertical position of the pie. The value is a relative value to the chart rectangle where:
98 \list
99 \o 0.0 is the absolute top.
100 \o 1.0 is the absolute bottom.
101 \endlist
102 Default value is 0.5 (center).
81 \sa horizontalPosition
103 \sa horizontalPosition
82 */
104 */
83
105
@@ -45,6 +45,19
45 chart->addSeries(series);
45 chart->addSeries(series);
46 \endcode
46 \endcode
47 */
47 */
48 /*!
49 \qmlclass ScatterSeries QScatterSeries
50 \inherits XYSeries
51
52 The following QML shows how to create a chart with two simple scatter series:
53 \snippet ../demos/qmlchart/qml/qmlchart/View5.qml 1
54 \snippet ../demos/qmlchart/qml/qmlchart/View5.qml 2
55
56 \beginfloatleft
57 \image demos_qmlchart5.png
58 \endfloat
59 \clearfloat
60 */
48
61
49 /*!
62 /*!
50 \enum QScatterSeries::MarkerShape
63 \enum QScatterSeries::MarkerShape
@@ -69,29 +82,41
69
82
70 /*!
83 /*!
71 \property QScatterSeries::markerShape
84 \property QScatterSeries::markerShape
72
73 Defines the shape of the marker used to draw the points in the series. The default shape is MarkerShapeCircle.
85 Defines the shape of the marker used to draw the points in the series. The default shape is MarkerShapeCircle.
74 */
86 */
87 /*!
88 \qmlproperty MarkerShape ScatterSeries::markerShape
89 Defines the shape of the marker used to draw the points in the series. One of ScatterSeries
90 ScatterSeries.MarkerShapeCircle or ScatterSeries.MarkerShapeRectangle.
91 The default shape is ScatterSeries.MarkerShapeCircle.
92 */
75
93
76 /*!
94 /*!
77 \property QScatterSeries::markerSize
95 \property QScatterSeries::markerSize
78
96 Defines the size of the marker used to draw the points in the series. The default size is 15.0.
97 */
98 /*!
99 \qmlproperty real ScatterSeries::markerSize
79 Defines the size of the marker used to draw the points in the series. The default size is 15.0.
100 Defines the size of the marker used to draw the points in the series. The default size is 15.0.
80 */
101 */
81
102
82 /*!
103 /*!
83 \fn void QScatterSeries::colorChanged(QColor color)
104 \fn void QScatterSeries::colorChanged(QColor color)
84 \brief Signal is emitted when the fill (brush) color has changed to \a color.
105 Signal is emitted when the fill (brush) color has changed to \a color.
85 */
106 */
86
107
87 /*!
108 /*!
88 \fn void QScatterSeries::borderColorChanged(QColor color)
109 \fn void QScatterSeries::borderColorChanged(QColor color)
89 \brief Signal is emitted when the line (pen) color has changed to \a color.
110 Signal is emitted when the line (pen) color has changed to \a color.
111 */
112 /*!
113 \qmlsignal ScatterSeries::borderColorChanged(color color)
114 Signal is emitted when the line (pen) color has changed to \a color.
90 */
115 */
91
116
92 /*!
117 /*!
93 \fn QChartSeriesType QScatterSeries::type() const
118 \fn QChartSeriesType QScatterSeries::type() const
94 \brief Returns QChartSeries::SeriesTypeScatter.
119 Returns QChartSeries::SeriesTypeScatter.
95 \sa QAbstractSeries, SeriesType
120 \sa QAbstractSeries, SeriesType
96 */
121 */
97
122
@@ -45,6 +45,18
45 */
45 */
46
46
47 /*!
47 /*!
48 \qmlclass SplineSeries QSplineSeries
49 \inherits XYSeries
50
51 The following QML shows how to create a simple spline chart:
52 \snippet ../demos/qmlchart/qml/qmlchart/View3.qml 1
53 \beginfloatleft
54 \image demos_qmlchart3.png
55 \endfloat
56 \clearfloat
57 */
58
59 /*!
48 \fn QSeriesType QSplineSeries::type() const
60 \fn QSeriesType QSplineSeries::type() const
49 Returns the type of the series
61 Returns the type of the series
50 */
62 */
@@ -29,10 +29,19 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 \class QXYSeries
29 \class QXYSeries
30 \brief The QXYSeries class is a base class for line, spline and scatter series.
30 \brief The QXYSeries class is a base class for line, spline and scatter series.
31 */
31 */
32 /*!
33 \qmlclass XYSeries
34 \brief The XYSeries class is a base class for line, spline and scatter series.
35
36 The class cannot be instantiated directly.
37 */
32
38
33 /*!
39 /*!
34 \property QXYSeries::pointsVisible
40 \property QXYSeries::pointsVisible
35
41 Controls if the data points are visible and should be drawn.
42 */
43 /*!
44 \qmlproperty bool XYSeries::pointsVisible
36 Controls if the data points are visible and should be drawn.
45 Controls if the data points are visible and should be drawn.
37 */
46 */
38
47
@@ -50,37 +59,70 QTCOMMERCIALCHART_BEGIN_NAMESPACE
50
59
51 /*!
60 /*!
52 \property QXYSeries::color
61 \property QXYSeries::color
53 Line (pen) color of the series. This is a convenience property for modifying the color of pen.
62 The color of the series. This is line (pen) color in case of QLineSeries or QSplineSeries and
54 \sa QXYSeries::pen()
63 fill (brush) color in case of QScatterSeries or QAreaSeries.
64 \sa QXYSeries::pen(), QXYSeries::brush()
65 */
66 /*!
67 \qmlproperty color XYSeries::color
68 The color of the series. This is line (pen) color in case of LineSeries or SplineSeries and
69 fill (brush) color in case of ScatterSeries or AreaSeries.
55 */
70 */
56
71
57 /*!
72 /*!
58 \fn void QXYSeries::clicked(const QPointF& point)
73 \fn void QXYSeries::clicked(const QPointF& point)
59 \brief Signal is emitted when user clicks the \a point on chart.
74 \brief Signal is emitted when user clicks the \a point on chart.
60 */
75 */
76 /*!
77 \qmlsignal XYSeries::onClicked(QPointF point)
78 Signal is emitted when user clicks the \a point on chart. For example:
79 \code
80 LineSeries {
81 XyPoint { x: 0; y: 0 }
82 XyPoint { x: 1.1; y: 2.1 }
83 onClicked: console.log("onClicked: " + point.x + ", " + point.y);
84 }
85 \endcode
86 */
61
87
62 /*!
88 /*!
63 \fn void QXYSeries::pointReplaced(int index)
89 \fn void QXYSeries::pointReplaced(int index)
64 \brief Signal is emitted when user replaces a point at \a index.
90 Signal is emitted when a point has been replaced at \a index.
65 \sa replace()
91 \sa replace()
66 */
92 */
93 /*!
94 \qmlsignal XYSeries::pointReplaced(int index)
95 Signal is emitted when a point has been replaced at \a index.
96 */
67
97
68 /*!
98 /*!
69 \fn void QXYSeries::pointAdded(int index)
99 \fn void QXYSeries::pointAdded(int index)
70 \brief Signal is emitted when user adds a point at \a index.
100 Signal is emitted when a point has been added at \a index.
71 \sa append(), insert()
101 \sa append(), insert()
72 */
102 */
103 /*!
104 \qmlsignal XYSeries::pointAdded(int index)
105 Signal is emitted when a point has been added at \a index.
106 */
73
107
74 /*!
108 /*!
75 \fn void QXYSeries::pointRemoved(int index)
109 \fn void QXYSeries::pointRemoved(int index)
76 \brief Signal is emitted when user removes a point at \a index.
110 Signal is emitted when a point has been removed from \a index.
77 \sa remove()
111 \sa remove()
78 */
112 */
113 /*!
114 \qmlsignal XYSeries::pointRemoved(int index)
115 Signal is emitted when a point has been removed from \a index.
116 */
79
117
80 /*!
118 /*!
81 \fn void QXYSeries::colorChanged(QColor color)
119 \fn void QXYSeries::colorChanged(QColor color)
82 \brief Signal is emitted when the line (pen) color has changed to \a color.
120 \brief Signal is emitted when the line (pen) color has changed to \a color.
83 */
121 */
122 /*!
123 \qmlsignal XYSeries::colorChanged(QColor color)
124 Signal is emitted when the line (pen) color has changed to \a color.
125 */
84
126
85 /*!
127 /*!
86 \fn void QXYSeriesPrivate::updated()
128 \fn void QXYSeriesPrivate::updated()
@@ -88,6 +130,10 QTCOMMERCIALCHART_BEGIN_NAMESPACE
88 */
130 */
89
131
90 /*!
132 /*!
133 \qmlmethod XyPoint XYSeries::at(int index)
134 */
135
136 /*!
91 \internal
137 \internal
92
138
93 Constructs empty series object which is a child of \a parent.
139 Constructs empty series object which is a child of \a parent.
@@ -32,6 +32,8 ChartView {
32 AreaSeries {
32 AreaSeries {
33 id: daSeries
33 id: daSeries
34 name: "area 1"
34 name: "area 1"
35 onSelected: console.log("areaSeries.onSelected");
36 onClicked: console.log("areaSeries.onClicked: " + point.x + ", " + point.y);
35 upperSeries: LineSeries {
37 upperSeries: LineSeries {
36 XyPoint { x: 0; y: 1 }
38 XyPoint { x: 0; y: 1 }
37 XyPoint { x: 1; y: 1 }
39 XyPoint { x: 1; y: 1 }
@@ -35,7 +35,10 ChartView {
35 name: "bar"
35 name: "bar"
36 onClicked: console.log("onClicked: " + barset + " " + index);
36 onClicked: console.log("onClicked: " + barset + " " + index);
37 onHovered: console.log("onHovered: " + barset + " " + status);
37 onHovered: console.log("onHovered: " + barset + " " + status);
38 BarSet { label: "Bob"; values: [4, 7, 3, 10, 5, 6] }
38 BarSet { label: "Bob"; values: [4, 7, 3, 10, 5, 6]
39 onClicked: console.log("barset.onClicked: " + index);
40 onHovered: console.log("barset.onHovered: " + status);
41 }
39 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 8] }
42 BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 8] }
40 BarSet { label: "James"; values: [3, 5, 8, 5, 4, 7] }
43 BarSet { label: "James"; values: [3, 5, 8, 5, 4, 7] }
41 }
44 }
@@ -30,6 +30,7 ChartView {
30 LineSeries {
30 LineSeries {
31 id: daSeries
31 id: daSeries
32 name: "line 1"
32 name: "line 1"
33 onClicked: console.log("onClicked: " + point.x + ", " + point.y);
33 XyPoint { x: 0; y: 0 }
34 XyPoint { x: 0; y: 0 }
34 XyPoint { x: 1.1; y: 2.1 }
35 XyPoint { x: 1.1; y: 2.1 }
35 XyPoint { x: 1.9; y: 3.3 }
36 XyPoint { x: 1.9; y: 3.3 }
General Comments 0
You need to be logged in to leave comments. Login now