##// END OF EJS Templates
Renamed XyPoint to XYPoint
Tero Ahola -
r1532:d1f7bd98a717
parent child
Show More
@@ -31,13 +31,13 Rectangle {
31
31
32 LineSeries {
32 LineSeries {
33 name: "LineSeries"
33 name: "LineSeries"
34 XyPoint { x: 0; y: 0 }
34 XYPoint { x: 0; y: 0 }
35 XyPoint { x: 1.1; y: 2.1 }
35 XYPoint { x: 1.1; y: 2.1 }
36 XyPoint { x: 1.9; y: 3.3 }
36 XYPoint { x: 1.9; y: 3.3 }
37 XyPoint { x: 2.1; y: 2.1 }
37 XYPoint { x: 2.1; y: 2.1 }
38 XyPoint { x: 2.9; y: 4.9 }
38 XYPoint { x: 2.9; y: 4.9 }
39 XyPoint { x: 3.4; y: 3.0 }
39 XYPoint { x: 3.4; y: 3.0 }
40 XyPoint { x: 4.1; y: 3.3 }
40 XYPoint { x: 4.1; y: 3.3 }
41 }
41 }
42 }
42 }
43 //![1]
43 //![1]
@@ -31,13 +31,13 Rectangle {
31
31
32 SplineSeries {
32 SplineSeries {
33 name: "SplineSeries"
33 name: "SplineSeries"
34 XyPoint { x: 0; y: 0.3 }
34 XYPoint { x: 0; y: 0.3 }
35 XyPoint { x: 1.1; y: 3.2 }
35 XYPoint { x: 1.1; y: 3.2 }
36 XyPoint { x: 1.9; y: 2.4 }
36 XYPoint { x: 1.9; y: 2.4 }
37 XyPoint { x: 2.1; y: 2.1 }
37 XYPoint { x: 2.1; y: 2.1 }
38 XyPoint { x: 2.9; y: 2.6 }
38 XYPoint { x: 2.9; y: 2.6 }
39 XyPoint { x: 3.4; y: 2.3 }
39 XYPoint { x: 3.4; y: 2.3 }
40 XyPoint { x: 4.1; y: 3.1 }
40 XYPoint { x: 4.1; y: 3.1 }
41 }
41 }
42 }
42 }
43 //![1]
43 //![1]
@@ -34,32 +34,32 Rectangle {
34 AreaSeries {
34 AreaSeries {
35 name: "Russian"
35 name: "Russian"
36 upperSeries: LineSeries {
36 upperSeries: LineSeries {
37 XyPoint { x: 0; y: 1 }
37 XYPoint { x: 0; y: 1 }
38 XyPoint { x: 1; y: 1 }
38 XYPoint { x: 1; y: 1 }
39 XyPoint { x: 2; y: 1 }
39 XYPoint { x: 2; y: 1 }
40 XyPoint { x: 3; y: 1 }
40 XYPoint { x: 3; y: 1 }
41 XyPoint { x: 4; y: 1 }
41 XYPoint { x: 4; y: 1 }
42 XyPoint { x: 5; y: 0 }
42 XYPoint { x: 5; y: 0 }
43 XyPoint { x: 6; y: 1 }
43 XYPoint { x: 6; y: 1 }
44 XyPoint { x: 7; y: 1 }
44 XYPoint { x: 7; y: 1 }
45 XyPoint { x: 8; y: 4 }
45 XYPoint { x: 8; y: 4 }
46 XyPoint { x: 9; y: 3 }
46 XYPoint { x: 9; y: 3 }
47 XyPoint { x: 10; y: 2 }
47 XYPoint { x: 10; y: 2 }
48 XyPoint { x: 11; y: 1 }
48 XYPoint { x: 11; y: 1 }
49 }
49 }
50 lowerSeries: LineSeries {
50 lowerSeries: LineSeries {
51 XyPoint { x: 0; y: 0 }
51 XYPoint { x: 0; y: 0 }
52 XyPoint { x: 1; y: 0 }
52 XYPoint { x: 1; y: 0 }
53 XyPoint { x: 2; y: 0 }
53 XYPoint { x: 2; y: 0 }
54 XyPoint { x: 3; y: 0 }
54 XYPoint { x: 3; y: 0 }
55 XyPoint { x: 4; y: 0 }
55 XYPoint { x: 4; y: 0 }
56 XyPoint { x: 5; y: 0 }
56 XYPoint { x: 5; y: 0 }
57 XyPoint { x: 6; y: 0 }
57 XYPoint { x: 6; y: 0 }
58 XyPoint { x: 7; y: 0 }
58 XYPoint { x: 7; y: 0 }
59 XyPoint { x: 8; y: 0 }
59 XYPoint { x: 8; y: 0 }
60 XyPoint { x: 9; y: 0 }
60 XYPoint { x: 9; y: 0 }
61 XyPoint { x: 10; y: 0 }
61 XYPoint { x: 10; y: 0 }
62 XyPoint { x: 11; y: 0 }
62 XYPoint { x: 11; y: 0 }
63 }
63 }
64 }
64 }
65 // ...
65 // ...
@@ -69,32 +69,32 Rectangle {
69 id: swedish
69 id: swedish
70 name: "Swedish"
70 name: "Swedish"
71 upperSeries: LineSeries {
71 upperSeries: LineSeries {
72 XyPoint { x: 0; y: 1 }
72 XYPoint { x: 0; y: 1 }
73 XyPoint { x: 1; y: 1 }
73 XYPoint { x: 1; y: 1 }
74 XyPoint { x: 2; y: 3 }
74 XYPoint { x: 2; y: 3 }
75 XyPoint { x: 3; y: 3 }
75 XYPoint { x: 3; y: 3 }
76 XyPoint { x: 4; y: 2 }
76 XYPoint { x: 4; y: 2 }
77 XyPoint { x: 5; y: 0 }
77 XYPoint { x: 5; y: 0 }
78 XyPoint { x: 6; y: 2 }
78 XYPoint { x: 6; y: 2 }
79 XyPoint { x: 7; y: 1 }
79 XYPoint { x: 7; y: 1 }
80 XyPoint { x: 8; y: 2 }
80 XYPoint { x: 8; y: 2 }
81 XyPoint { x: 9; y: 1 }
81 XYPoint { x: 9; y: 1 }
82 XyPoint { x: 10; y: 3 }
82 XYPoint { x: 10; y: 3 }
83 XyPoint { x: 11; y: 3 }
83 XYPoint { x: 11; y: 3 }
84 }
84 }
85 lowerSeries: LineSeries {
85 lowerSeries: LineSeries {
86 XyPoint { x: 0; y: 0 }
86 XYPoint { x: 0; y: 0 }
87 XyPoint { x: 1; y: 0 }
87 XYPoint { x: 1; y: 0 }
88 XyPoint { x: 2; y: 0 }
88 XYPoint { x: 2; y: 0 }
89 XyPoint { x: 3; y: 0 }
89 XYPoint { x: 3; y: 0 }
90 XyPoint { x: 4; y: 0 }
90 XYPoint { x: 4; y: 0 }
91 XyPoint { x: 5; y: 0 }
91 XYPoint { x: 5; y: 0 }
92 XyPoint { x: 6; y: 0 }
92 XYPoint { x: 6; y: 0 }
93 XyPoint { x: 7; y: 0 }
93 XYPoint { x: 7; y: 0 }
94 XyPoint { x: 8; y: 0 }
94 XYPoint { x: 8; y: 0 }
95 XyPoint { x: 9; y: 0 }
95 XYPoint { x: 9; y: 0 }
96 XyPoint { x: 10; y: 0 }
96 XYPoint { x: 10; y: 0 }
97 XyPoint { x: 11; y: 0 }
97 XYPoint { x: 11; y: 0 }
98 }
98 }
99 onClicked: {
99 onClicked: {
100 color = "yellow";
100 color = "yellow";
@@ -105,32 +105,32 Rectangle {
105 AreaSeries {
105 AreaSeries {
106 name: "Finnish"
106 name: "Finnish"
107 upperSeries: LineSeries {
107 upperSeries: LineSeries {
108 XyPoint { x: 0; y: 0 }
108 XYPoint { x: 0; y: 0 }
109 XyPoint { x: 1; y: 0 }
109 XYPoint { x: 1; y: 0 }
110 XyPoint { x: 2; y: 0 }
110 XYPoint { x: 2; y: 0 }
111 XyPoint { x: 3; y: 0 }
111 XYPoint { x: 3; y: 0 }
112 XyPoint { x: 4; y: 0 }
112 XYPoint { x: 4; y: 0 }
113 XyPoint { x: 5; y: 0 }
113 XYPoint { x: 5; y: 0 }
114 XyPoint { x: 6; y: 1 }
114 XYPoint { x: 6; y: 1 }
115 XyPoint { x: 7; y: 0 }
115 XYPoint { x: 7; y: 0 }
116 XyPoint { x: 8; y: 0 }
116 XYPoint { x: 8; y: 0 }
117 XyPoint { x: 9; y: 0 }
117 XYPoint { x: 9; y: 0 }
118 XyPoint { x: 10; y: 0 }
118 XYPoint { x: 10; y: 0 }
119 XyPoint { x: 11; y: 1 }
119 XYPoint { x: 11; y: 1 }
120 }
120 }
121 lowerSeries: LineSeries {
121 lowerSeries: LineSeries {
122 XyPoint { x: 0; y: 0 }
122 XYPoint { x: 0; y: 0 }
123 XyPoint { x: 1; y: 0 }
123 XYPoint { x: 1; y: 0 }
124 XyPoint { x: 2; y: 0 }
124 XYPoint { x: 2; y: 0 }
125 XyPoint { x: 3; y: 0 }
125 XYPoint { x: 3; y: 0 }
126 XyPoint { x: 4; y: 0 }
126 XYPoint { x: 4; y: 0 }
127 XyPoint { x: 5; y: 0 }
127 XYPoint { x: 5; y: 0 }
128 XyPoint { x: 6; y: 0 }
128 XYPoint { x: 6; y: 0 }
129 XyPoint { x: 7; y: 0 }
129 XYPoint { x: 7; y: 0 }
130 XyPoint { x: 8; y: 0 }
130 XYPoint { x: 8; y: 0 }
131 XyPoint { x: 9; y: 0 }
131 XYPoint { x: 9; y: 0 }
132 XyPoint { x: 10; y: 0 }
132 XYPoint { x: 10; y: 0 }
133 XyPoint { x: 11; y: 0 }
133 XYPoint { x: 11; y: 0 }
134 }
134 }
135 onClicked: {
135 onClicked: {
136 color = "white";
136 color = "white";
@@ -32,25 +32,25 Rectangle {
32 ScatterSeries {
32 ScatterSeries {
33 id: scatter1
33 id: scatter1
34 name: "Scatter1"
34 name: "Scatter1"
35 XyPoint { x: 1.5; y: 1.5 }
35 XYPoint { x: 1.5; y: 1.5 }
36 XyPoint { x: 1.5; y: 1.6 }
36 XYPoint { x: 1.5; y: 1.6 }
37 XyPoint { x: 1.57; y: 1.55 }
37 XYPoint { x: 1.57; y: 1.55 }
38 XyPoint { x: 1.8; y: 1.8 }
38 XYPoint { x: 1.8; y: 1.8 }
39 XyPoint { x: 1.9; y: 1.6 }
39 XYPoint { x: 1.9; y: 1.6 }
40 XyPoint { x: 2.1; y: 1.3 }
40 XYPoint { x: 2.1; y: 1.3 }
41 XyPoint { x: 2.5; y: 2.1 }
41 XYPoint { x: 2.5; y: 2.1 }
42 }
42 }
43
43
44 ScatterSeries {
44 ScatterSeries {
45 name: "Scatter2"
45 name: "Scatter2"
46 // ...
46 // ...
47 //![1]
47 //![1]
48 XyPoint { x: 2.0; y: 2.0 }
48 XYPoint { x: 2.0; y: 2.0 }
49 XyPoint { x: 2.0; y: 2.1 }
49 XYPoint { x: 2.0; y: 2.1 }
50 XyPoint { x: 2.07; y: 2.05 }
50 XYPoint { x: 2.07; y: 2.05 }
51 XyPoint { x: 2.2; y: 2.9 }
51 XYPoint { x: 2.2; y: 2.9 }
52 XyPoint { x: 2.4; y: 2.7 }
52 XYPoint { x: 2.4; y: 2.7 }
53 XyPoint { x: 2.67; y: 2.65 }
53 XYPoint { x: 2.67; y: 2.65 }
54 //![2]
54 //![2]
55 }
55 }
56 }
56 }
@@ -37,7 +37,7
37 <li><a href="qml-areaseries.html">AreaSeries</a></li>
37 <li><a href="qml-areaseries.html">AreaSeries</a></li>
38 <li><a href="qml-scatterseries.html">ScatterSeries</a></li>
38 <li><a href="qml-scatterseries.html">ScatterSeries</a></li>
39 <li><a href="qml-splineseries.html">SplineSeries</a></li>
39 <li><a href="qml-splineseries.html">SplineSeries</a></li>
40 <li><a href="qml-xypoint.html">XyPoint</a></li>
40 <li><a href="qml-xypoint.html">XYPoint</a></li>
41 <li><a href="qml-hxymodelmapper.html">HXYModelMapper</a></li>
41 <li><a href="qml-hxymodelmapper.html">HXYModelMapper</a></li>
42 <li><a href="qml-vxymodelmapper.html">VXYModelMapper</a></li>
42 <li><a href="qml-vxymodelmapper.html">VXYModelMapper</a></li>
43 </ul>
43 </ul>
@@ -23,23 +23,23
23 QTCOMMERCIALCHART_BEGIN_NAMESPACE
23 QTCOMMERCIALCHART_BEGIN_NAMESPACE
24
24
25 /*!
25 /*!
26 \qmlclass XyPoint QPointF
26 \qmlclass XYPoint QPointF
27 XyPoint is a convenience element for initializing XY-series with static coordinate data. To
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.
28 manipulate an XY-series dynamically, use it's data manipulation functions instead.
29 \sa LineSeries, AreaSeries, ScatterSeries, SplineSeries
29 \sa LineSeries, AreaSeries, ScatterSeries, SplineSeries
30 */
30 */
31
31
32 /*!
32 /*!
33 \qmlproperty real XyPoint::x
33 \qmlproperty real XYPoint::x
34 The x-coordinate of the point.
34 The x-coordinate of the point.
35 */
35 */
36
36
37 /*!
37 /*!
38 \qmlproperty real XyPoint::y
38 \qmlproperty real XYPoint::y
39 The y-coordinate of the point.
39 The y-coordinate of the point.
40 */
40 */
41
41
42 DeclarativeXyPoint::DeclarativeXyPoint(QObject *parent) :
42 DeclarativeXYPoint::DeclarativeXYPoint(QObject *parent) :
43 QObject(parent)
43 QObject(parent)
44 {
44 {
45 setX(0.0);
45 setX(0.0);
@@ -28,7 +28,7
28
28
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30
30
31 class DeclarativeXyPoint : public QObject, public QPointF
31 class DeclarativeXYPoint : public QObject, public QPointF
32 {
32 {
33 Q_OBJECT
33 Q_OBJECT
34 // TODO: make the setters change the value, if parented by a series
34 // TODO: make the setters change the value, if parented by a series
@@ -36,7 +36,7 class DeclarativeXyPoint : public QObject, public QPointF
36 Q_PROPERTY(qreal y READ y WRITE setY /*NOTIFY dataYChanged*/)
36 Q_PROPERTY(qreal y READ y WRITE setY /*NOTIFY dataYChanged*/)
37
37
38 public:
38 public:
39 explicit DeclarativeXyPoint(QObject *parent = 0);
39 explicit DeclarativeXYPoint(QObject *parent = 0);
40 };
40 };
41
41
42 QTCOMMERCIALCHART_END_NAMESPACE
42 QTCOMMERCIALCHART_END_NAMESPACE
@@ -46,8 +46,8 void DeclarativeXySeries::componentComplete()
46 Q_ASSERT(series);
46 Q_ASSERT(series);
47
47
48 foreach(QObject *child, series->children()) {
48 foreach(QObject *child, series->children()) {
49 if (qobject_cast<DeclarativeXyPoint *>(child)) {
49 if (qobject_cast<DeclarativeXYPoint *>(child)) {
50 DeclarativeXyPoint *point = qobject_cast<DeclarativeXyPoint *>(child);
50 DeclarativeXYPoint *point = qobject_cast<DeclarativeXYPoint *>(child);
51 series->append(point->x(), point->y());
51 series->append(point->x(), point->y());
52 } else if(qobject_cast<QVXYModelMapper *>(child)) {
52 } else if(qobject_cast<QVXYModelMapper *>(child)) {
53 QVXYModelMapper *mapper = qobject_cast<QVXYModelMapper *>(child);
53 QVXYModelMapper *mapper = qobject_cast<QVXYModelMapper *>(child);
@@ -48,7 +48,7 public:
48 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart"));
48 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart"));
49
49
50 qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView");
50 qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView");
51 qmlRegisterType<DeclarativeXyPoint>(uri, 1, 0, "XyPoint");
51 qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint");
52 qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries");
52 qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries");
53 qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries");
53 qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries");
54 qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries");
54 qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries");
@@ -160,7 +160,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
160
160
161 /*!
161 /*!
162 \qmlmethod BarSet BarSeries::append(string label, VariantList values)
162 \qmlmethod BarSet BarSeries::append(string label, VariantList values)
163 Adds a new bar set with \a label and \a values to \a index. Values can be a list of reals or a list of XyPoints.
163 Adds a new bar set with \a label and \a values to \a index. Values can be a list of reals or a list of XYPoints.
164 For example:
164 For example:
165 \code
165 \code
166 myBarSeries.append("set 1", [0, 0.2, 0.2, 0.5, 0.4, 1.5, 0.9]);
166 myBarSeries.append("set 1", [0, 0.2, 0.2, 0.5, 0.4, 1.5, 0.9]);
@@ -170,7 +170,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
170
170
171 /*!
171 /*!
172 \qmlmethod BarSet BarSeries::insert(int index, string label, VariantList values)
172 \qmlmethod BarSet BarSeries::insert(int index, string label, VariantList values)
173 Inserts a new bar set with \a label and \a values to \a index. Values can be a list of reals or a list of XyPoints.
173 Inserts a new bar set with \a label and \a values to \a index. Values can be a list of reals or a list of XYPoints.
174 If index is zero or smaller, the new barset is prepended. If the index is count or bigger, the new barset is
174 If index is zero or smaller, the new barset is prepended. If the index is count or bigger, the new barset is
175 appended.
175 appended.
176 \sa BarSeries::append()
176 \sa BarSeries::append()
@@ -79,8 +79,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
79 Signal is emitted when user clicks the \a point on chart. For example:
79 Signal is emitted when user clicks the \a point on chart. For example:
80 \code
80 \code
81 LineSeries {
81 LineSeries {
82 XyPoint { x: 0; y: 0 }
82 XYPoint { x: 0; y: 0 }
83 XyPoint { x: 1.1; y: 2.1 }
83 XYPoint { x: 1.1; y: 2.1 }
84 onClicked: console.log("onClicked: " + point.x + ", " + point.y);
84 onClicked: console.log("onClicked: " + point.x + ", " + point.y);
85 }
85 }
86 \endcode
86 \endcode
@@ -33,32 +33,32 ChartView {
33 id: areaSeries
33 id: areaSeries
34 name: "area 1"
34 name: "area 1"
35 upperSeries: LineSeries {
35 upperSeries: LineSeries {
36 XyPoint { x: 0; y: 1 }
36 XYPoint { x: 0; y: 1 }
37 XyPoint { x: 1; y: 1 }
37 XYPoint { x: 1; y: 1 }
38 XyPoint { x: 2; y: 3 }
38 XYPoint { x: 2; y: 3 }
39 XyPoint { x: 3; y: 3 }
39 XYPoint { x: 3; y: 3 }
40 XyPoint { x: 4; y: 2 }
40 XYPoint { x: 4; y: 2 }
41 XyPoint { x: 5; y: 0 }
41 XYPoint { x: 5; y: 0 }
42 XyPoint { x: 6; y: 2 }
42 XYPoint { x: 6; y: 2 }
43 XyPoint { x: 7; y: 1 }
43 XYPoint { x: 7; y: 1 }
44 XyPoint { x: 8; y: 2 }
44 XYPoint { x: 8; y: 2 }
45 XyPoint { x: 9; y: 1 }
45 XYPoint { x: 9; y: 1 }
46 XyPoint { x: 10; y: 3 }
46 XYPoint { x: 10; y: 3 }
47 XyPoint { x: 11; y: 3 }
47 XYPoint { x: 11; y: 3 }
48 }
48 }
49 lowerSeries: LineSeries {
49 lowerSeries: LineSeries {
50 XyPoint { x: 0; y: 0 }
50 XYPoint { x: 0; y: 0 }
51 XyPoint { x: 1; y: 0 }
51 XYPoint { x: 1; y: 0 }
52 XyPoint { x: 2; y: 0 }
52 XYPoint { x: 2; y: 0 }
53 XyPoint { x: 3; y: 0 }
53 XYPoint { x: 3; y: 0 }
54 XyPoint { x: 4; y: 0 }
54 XYPoint { x: 4; y: 0 }
55 XyPoint { x: 5; y: 0 }
55 XYPoint { x: 5; y: 0 }
56 XyPoint { x: 6; y: 0 }
56 XYPoint { x: 6; y: 0 }
57 XyPoint { x: 7; y: 0 }
57 XYPoint { x: 7; y: 0 }
58 XyPoint { x: 8; y: 0 }
58 XYPoint { x: 8; y: 0 }
59 XyPoint { x: 9; y: 0 }
59 XYPoint { x: 9; y: 0 }
60 XyPoint { x: 10; y: 0 }
60 XYPoint { x: 10; y: 0 }
61 XyPoint { x: 11; y: 0 }
61 XYPoint { x: 11; y: 0 }
62 }
62 }
63
63
64 onNameChanged: console.log("areaSeries.onNameChanged: " + name);
64 onNameChanged: console.log("areaSeries.onNameChanged: " + name);
@@ -29,13 +29,13 ChartView {
29
29
30 LineSeries {
30 LineSeries {
31 name: "line"
31 name: "line"
32 XyPoint { x: 0; y: 0 }
32 XYPoint { x: 0; y: 0 }
33 XyPoint { x: 1.1; y: 2.1 }
33 XYPoint { x: 1.1; y: 2.1 }
34 XyPoint { x: 1.9; y: 3.3 }
34 XYPoint { x: 1.9; y: 3.3 }
35 XyPoint { x: 2.1; y: 2.1 }
35 XYPoint { x: 2.1; y: 2.1 }
36 XyPoint { x: 2.9; y: 4.9 }
36 XYPoint { x: 2.9; y: 4.9 }
37 XyPoint { x: 3.4; y: 3.0 }
37 XYPoint { x: 3.4; y: 3.0 }
38 XyPoint { x: 4.1; y: 3.3 }
38 XYPoint { x: 4.1; y: 3.3 }
39 }
39 }
40
40
41 onVisibleChanged: console.log("chart.onVisibleChanged: " + visible);
41 onVisibleChanged: console.log("chart.onVisibleChanged: " + visible);
@@ -30,13 +30,13 ChartView {
30 LineSeries {
30 LineSeries {
31 id: lineSeries
31 id: lineSeries
32 name: "line 1"
32 name: "line 1"
33 XyPoint { x: 0; y: 0 }
33 XYPoint { x: 0; y: 0 }
34 XyPoint { x: 1.1; y: 2.1 }
34 XYPoint { x: 1.1; y: 2.1 }
35 XyPoint { x: 1.9; y: 3.3 }
35 XYPoint { x: 1.9; y: 3.3 }
36 XyPoint { x: 2.1; y: 2.1 }
36 XYPoint { x: 2.1; y: 2.1 }
37 XyPoint { x: 2.9; y: 4.9 }
37 XYPoint { x: 2.9; y: 4.9 }
38 XyPoint { x: 3.4; y: 3.0 }
38 XYPoint { x: 3.4; y: 3.0 }
39 XyPoint { x: 4.1; y: 3.3 }
39 XYPoint { x: 4.1; y: 3.3 }
40
40
41 onNameChanged: console.log("lineSeries.onNameChanged: " + name);
41 onNameChanged: console.log("lineSeries.onNameChanged: " + name);
42 onVisibleChanged: console.log("lineSeries.onVisibleChanged: " + visible);
42 onVisibleChanged: console.log("lineSeries.onVisibleChanged: " + visible);
@@ -50,12 +50,12 ChartView {
50
50
51 LineSeries {
51 LineSeries {
52 name: "line 2"
52 name: "line 2"
53 XyPoint { x: 1.1; y: 1.1 }
53 XYPoint { x: 1.1; y: 1.1 }
54 XyPoint { x: 1.9; y: 2.3 }
54 XYPoint { x: 1.9; y: 2.3 }
55 XyPoint { x: 2.1; y: 1.1 }
55 XYPoint { x: 2.1; y: 1.1 }
56 XyPoint { x: 2.9; y: 3.9 }
56 XYPoint { x: 2.9; y: 3.9 }
57 XyPoint { x: 3.4; y: 2.0 }
57 XYPoint { x: 3.4; y: 2.0 }
58 XyPoint { x: 4.1; y: 2.3 }
58 XYPoint { x: 4.1; y: 2.3 }
59 onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y);
59 onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y);
60 }
60 }
61 }
61 }
@@ -30,13 +30,13 ChartView {
30 ScatterSeries {
30 ScatterSeries {
31 id: scatterSeries
31 id: scatterSeries
32 name: "scatter 1"
32 name: "scatter 1"
33 XyPoint { x: 1.5; y: 1.5 }
33 XYPoint { x: 1.5; y: 1.5 }
34 XyPoint { x: 1.5; y: 1.6 }
34 XYPoint { x: 1.5; y: 1.6 }
35 XyPoint { x: 1.57; y: 1.55 }
35 XYPoint { x: 1.57; y: 1.55 }
36 XyPoint { x: 1.8; y: 1.8 }
36 XYPoint { x: 1.8; y: 1.8 }
37 XyPoint { x: 1.9; y: 1.6 }
37 XYPoint { x: 1.9; y: 1.6 }
38 XyPoint { x: 2.1; y: 1.3 }
38 XYPoint { x: 2.1; y: 1.3 }
39 XyPoint { x: 2.5; y: 2.1 }
39 XYPoint { x: 2.5; y: 2.1 }
40
40
41 onNameChanged: console.log("scatterSeries.onNameChanged: " + name);
41 onNameChanged: console.log("scatterSeries.onNameChanged: " + name);
42 onVisibleChanged: console.log("scatterSeries.onVisibleChanged: " + visible);
42 onVisibleChanged: console.log("scatterSeries.onVisibleChanged: " + visible);
@@ -51,12 +51,12 ChartView {
51
51
52 ScatterSeries {
52 ScatterSeries {
53 name: "scatter2"
53 name: "scatter2"
54 XyPoint { x: 2.0; y: 2.0 }
54 XYPoint { x: 2.0; y: 2.0 }
55 XyPoint { x: 2.0; y: 2.1 }
55 XYPoint { x: 2.0; y: 2.1 }
56 XyPoint { x: 2.07; y: 2.05 }
56 XYPoint { x: 2.07; y: 2.05 }
57 XyPoint { x: 2.2; y: 2.9 }
57 XYPoint { x: 2.2; y: 2.9 }
58 XyPoint { x: 2.4; y: 2.7 }
58 XYPoint { x: 2.4; y: 2.7 }
59 XyPoint { x: 2.67; y: 2.65 }
59 XYPoint { x: 2.67; y: 2.65 }
60 onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y);
60 onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y);
61 }
61 }
62 }
62 }
@@ -29,13 +29,13 ChartView {
29 SplineSeries {
29 SplineSeries {
30 id: splineSeries
30 id: splineSeries
31 name: "spline 1"
31 name: "spline 1"
32 XyPoint { x: 0; y: 0 }
32 XYPoint { x: 0; y: 0 }
33 XyPoint { x: 1.1; y: 2.1 }
33 XYPoint { x: 1.1; y: 2.1 }
34 XyPoint { x: 1.9; y: 3.3 }
34 XYPoint { x: 1.9; y: 3.3 }
35 XyPoint { x: 2.1; y: 2.1 }
35 XYPoint { x: 2.1; y: 2.1 }
36 XyPoint { x: 2.9; y: 4.9 }
36 XYPoint { x: 2.9; y: 4.9 }
37 XyPoint { x: 3.4; y: 3.0 }
37 XYPoint { x: 3.4; y: 3.0 }
38 XyPoint { x: 4.1; y: 3.3 }
38 XYPoint { x: 4.1; y: 3.3 }
39
39
40 onNameChanged: console.log("splineSeries.onNameChanged: " + name);
40 onNameChanged: console.log("splineSeries.onNameChanged: " + name);
41 onVisibleChanged: console.log("splineSeries.onVisibleChanged: " + visible);
41 onVisibleChanged: console.log("splineSeries.onVisibleChanged: " + visible);
@@ -49,12 +49,12 ChartView {
49
49
50 SplineSeries {
50 SplineSeries {
51 name: "spline 2"
51 name: "spline 2"
52 XyPoint { x: 1.1; y: 1.1 }
52 XYPoint { x: 1.1; y: 1.1 }
53 XyPoint { x: 1.9; y: 2.3 }
53 XYPoint { x: 1.9; y: 2.3 }
54 XyPoint { x: 2.1; y: 1.1 }
54 XYPoint { x: 2.1; y: 1.1 }
55 XyPoint { x: 2.9; y: 3.9 }
55 XYPoint { x: 2.9; y: 3.9 }
56 XyPoint { x: 3.4; y: 2.0 }
56 XYPoint { x: 3.4; y: 2.0 }
57 XyPoint { x: 4.1; y: 2.3 }
57 XYPoint { x: 4.1; y: 2.3 }
58 onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y);
58 onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y);
59 }
59 }
60 }
60 }
General Comments 0
You need to be logged in to leave comments. Login now