@@ -31,13 +31,13 Rectangle { | |||||
31 |
|
31 | |||
32 | LineSeries { |
|
32 | LineSeries { | |
33 | name: "LineSeries" |
|
33 | name: "LineSeries" | |
34 |
X |
|
34 | XYPoint { x: 0; y: 0 } | |
35 |
X |
|
35 | XYPoint { x: 1.1; y: 2.1 } | |
36 |
X |
|
36 | XYPoint { x: 1.9; y: 3.3 } | |
37 |
X |
|
37 | XYPoint { x: 2.1; y: 2.1 } | |
38 |
X |
|
38 | XYPoint { x: 2.9; y: 4.9 } | |
39 |
X |
|
39 | XYPoint { x: 3.4; y: 3.0 } | |
40 |
X |
|
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 |
X |
|
34 | XYPoint { x: 0; y: 0.3 } | |
35 |
X |
|
35 | XYPoint { x: 1.1; y: 3.2 } | |
36 |
X |
|
36 | XYPoint { x: 1.9; y: 2.4 } | |
37 |
X |
|
37 | XYPoint { x: 2.1; y: 2.1 } | |
38 |
X |
|
38 | XYPoint { x: 2.9; y: 2.6 } | |
39 |
X |
|
39 | XYPoint { x: 3.4; y: 2.3 } | |
40 |
X |
|
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 |
X |
|
37 | XYPoint { x: 0; y: 1 } | |
38 |
X |
|
38 | XYPoint { x: 1; y: 1 } | |
39 |
X |
|
39 | XYPoint { x: 2; y: 1 } | |
40 |
X |
|
40 | XYPoint { x: 3; y: 1 } | |
41 |
X |
|
41 | XYPoint { x: 4; y: 1 } | |
42 |
X |
|
42 | XYPoint { x: 5; y: 0 } | |
43 |
X |
|
43 | XYPoint { x: 6; y: 1 } | |
44 |
X |
|
44 | XYPoint { x: 7; y: 1 } | |
45 |
X |
|
45 | XYPoint { x: 8; y: 4 } | |
46 |
X |
|
46 | XYPoint { x: 9; y: 3 } | |
47 |
X |
|
47 | XYPoint { x: 10; y: 2 } | |
48 |
X |
|
48 | XYPoint { x: 11; y: 1 } | |
49 | } |
|
49 | } | |
50 | lowerSeries: LineSeries { |
|
50 | lowerSeries: LineSeries { | |
51 |
X |
|
51 | XYPoint { x: 0; y: 0 } | |
52 |
X |
|
52 | XYPoint { x: 1; y: 0 } | |
53 |
X |
|
53 | XYPoint { x: 2; y: 0 } | |
54 |
X |
|
54 | XYPoint { x: 3; y: 0 } | |
55 |
X |
|
55 | XYPoint { x: 4; y: 0 } | |
56 |
X |
|
56 | XYPoint { x: 5; y: 0 } | |
57 |
X |
|
57 | XYPoint { x: 6; y: 0 } | |
58 |
X |
|
58 | XYPoint { x: 7; y: 0 } | |
59 |
X |
|
59 | XYPoint { x: 8; y: 0 } | |
60 |
X |
|
60 | XYPoint { x: 9; y: 0 } | |
61 |
X |
|
61 | XYPoint { x: 10; y: 0 } | |
62 |
X |
|
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 |
X |
|
72 | XYPoint { x: 0; y: 1 } | |
73 |
X |
|
73 | XYPoint { x: 1; y: 1 } | |
74 |
X |
|
74 | XYPoint { x: 2; y: 3 } | |
75 |
X |
|
75 | XYPoint { x: 3; y: 3 } | |
76 |
X |
|
76 | XYPoint { x: 4; y: 2 } | |
77 |
X |
|
77 | XYPoint { x: 5; y: 0 } | |
78 |
X |
|
78 | XYPoint { x: 6; y: 2 } | |
79 |
X |
|
79 | XYPoint { x: 7; y: 1 } | |
80 |
X |
|
80 | XYPoint { x: 8; y: 2 } | |
81 |
X |
|
81 | XYPoint { x: 9; y: 1 } | |
82 |
X |
|
82 | XYPoint { x: 10; y: 3 } | |
83 |
X |
|
83 | XYPoint { x: 11; y: 3 } | |
84 | } |
|
84 | } | |
85 | lowerSeries: LineSeries { |
|
85 | lowerSeries: LineSeries { | |
86 |
X |
|
86 | XYPoint { x: 0; y: 0 } | |
87 |
X |
|
87 | XYPoint { x: 1; y: 0 } | |
88 |
X |
|
88 | XYPoint { x: 2; y: 0 } | |
89 |
X |
|
89 | XYPoint { x: 3; y: 0 } | |
90 |
X |
|
90 | XYPoint { x: 4; y: 0 } | |
91 |
X |
|
91 | XYPoint { x: 5; y: 0 } | |
92 |
X |
|
92 | XYPoint { x: 6; y: 0 } | |
93 |
X |
|
93 | XYPoint { x: 7; y: 0 } | |
94 |
X |
|
94 | XYPoint { x: 8; y: 0 } | |
95 |
X |
|
95 | XYPoint { x: 9; y: 0 } | |
96 |
X |
|
96 | XYPoint { x: 10; y: 0 } | |
97 |
X |
|
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 |
X |
|
108 | XYPoint { x: 0; y: 0 } | |
109 |
X |
|
109 | XYPoint { x: 1; y: 0 } | |
110 |
X |
|
110 | XYPoint { x: 2; y: 0 } | |
111 |
X |
|
111 | XYPoint { x: 3; y: 0 } | |
112 |
X |
|
112 | XYPoint { x: 4; y: 0 } | |
113 |
X |
|
113 | XYPoint { x: 5; y: 0 } | |
114 |
X |
|
114 | XYPoint { x: 6; y: 1 } | |
115 |
X |
|
115 | XYPoint { x: 7; y: 0 } | |
116 |
X |
|
116 | XYPoint { x: 8; y: 0 } | |
117 |
X |
|
117 | XYPoint { x: 9; y: 0 } | |
118 |
X |
|
118 | XYPoint { x: 10; y: 0 } | |
119 |
X |
|
119 | XYPoint { x: 11; y: 1 } | |
120 | } |
|
120 | } | |
121 | lowerSeries: LineSeries { |
|
121 | lowerSeries: LineSeries { | |
122 |
X |
|
122 | XYPoint { x: 0; y: 0 } | |
123 |
X |
|
123 | XYPoint { x: 1; y: 0 } | |
124 |
X |
|
124 | XYPoint { x: 2; y: 0 } | |
125 |
X |
|
125 | XYPoint { x: 3; y: 0 } | |
126 |
X |
|
126 | XYPoint { x: 4; y: 0 } | |
127 |
X |
|
127 | XYPoint { x: 5; y: 0 } | |
128 |
X |
|
128 | XYPoint { x: 6; y: 0 } | |
129 |
X |
|
129 | XYPoint { x: 7; y: 0 } | |
130 |
X |
|
130 | XYPoint { x: 8; y: 0 } | |
131 |
X |
|
131 | XYPoint { x: 9; y: 0 } | |
132 |
X |
|
132 | XYPoint { x: 10; y: 0 } | |
133 |
X |
|
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 |
X |
|
35 | XYPoint { x: 1.5; y: 1.5 } | |
36 |
X |
|
36 | XYPoint { x: 1.5; y: 1.6 } | |
37 |
X |
|
37 | XYPoint { x: 1.57; y: 1.55 } | |
38 |
X |
|
38 | XYPoint { x: 1.8; y: 1.8 } | |
39 |
X |
|
39 | XYPoint { x: 1.9; y: 1.6 } | |
40 |
X |
|
40 | XYPoint { x: 2.1; y: 1.3 } | |
41 |
X |
|
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 |
X |
|
48 | XYPoint { x: 2.0; y: 2.0 } | |
49 |
X |
|
49 | XYPoint { x: 2.0; y: 2.1 } | |
50 |
X |
|
50 | XYPoint { x: 2.07; y: 2.05 } | |
51 |
X |
|
51 | XYPoint { x: 2.2; y: 2.9 } | |
52 |
X |
|
52 | XYPoint { x: 2.4; y: 2.7 } | |
53 |
X |
|
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">X |
|
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 X |
|
26 | \qmlclass XYPoint QPointF | |
27 |
X |
|
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 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 X |
|
38 | \qmlproperty real XYPoint::y | |
39 | The y-coordinate of the point. |
|
39 | The y-coordinate of the point. | |
40 | */ |
|
40 | */ | |
41 |
|
41 | |||
42 |
DeclarativeX |
|
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 DeclarativeX |
|
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 DeclarativeX |
|
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<DeclarativeX |
|
49 | if (qobject_cast<DeclarativeXYPoint *>(child)) { | |
50 |
DeclarativeX |
|
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<DeclarativeX |
|
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 X |
|
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 X |
|
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 |
X |
|
82 | XYPoint { x: 0; y: 0 } | |
83 |
X |
|
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 |
X |
|
36 | XYPoint { x: 0; y: 1 } | |
37 |
X |
|
37 | XYPoint { x: 1; y: 1 } | |
38 |
X |
|
38 | XYPoint { x: 2; y: 3 } | |
39 |
X |
|
39 | XYPoint { x: 3; y: 3 } | |
40 |
X |
|
40 | XYPoint { x: 4; y: 2 } | |
41 |
X |
|
41 | XYPoint { x: 5; y: 0 } | |
42 |
X |
|
42 | XYPoint { x: 6; y: 2 } | |
43 |
X |
|
43 | XYPoint { x: 7; y: 1 } | |
44 |
X |
|
44 | XYPoint { x: 8; y: 2 } | |
45 |
X |
|
45 | XYPoint { x: 9; y: 1 } | |
46 |
X |
|
46 | XYPoint { x: 10; y: 3 } | |
47 |
X |
|
47 | XYPoint { x: 11; y: 3 } | |
48 | } |
|
48 | } | |
49 | lowerSeries: LineSeries { |
|
49 | lowerSeries: LineSeries { | |
50 |
X |
|
50 | XYPoint { x: 0; y: 0 } | |
51 |
X |
|
51 | XYPoint { x: 1; y: 0 } | |
52 |
X |
|
52 | XYPoint { x: 2; y: 0 } | |
53 |
X |
|
53 | XYPoint { x: 3; y: 0 } | |
54 |
X |
|
54 | XYPoint { x: 4; y: 0 } | |
55 |
X |
|
55 | XYPoint { x: 5; y: 0 } | |
56 |
X |
|
56 | XYPoint { x: 6; y: 0 } | |
57 |
X |
|
57 | XYPoint { x: 7; y: 0 } | |
58 |
X |
|
58 | XYPoint { x: 8; y: 0 } | |
59 |
X |
|
59 | XYPoint { x: 9; y: 0 } | |
60 |
X |
|
60 | XYPoint { x: 10; y: 0 } | |
61 |
X |
|
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 |
X |
|
32 | XYPoint { x: 0; y: 0 } | |
33 |
X |
|
33 | XYPoint { x: 1.1; y: 2.1 } | |
34 |
X |
|
34 | XYPoint { x: 1.9; y: 3.3 } | |
35 |
X |
|
35 | XYPoint { x: 2.1; y: 2.1 } | |
36 |
X |
|
36 | XYPoint { x: 2.9; y: 4.9 } | |
37 |
X |
|
37 | XYPoint { x: 3.4; y: 3.0 } | |
38 |
X |
|
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 |
X |
|
33 | XYPoint { x: 0; y: 0 } | |
34 |
X |
|
34 | XYPoint { x: 1.1; y: 2.1 } | |
35 |
X |
|
35 | XYPoint { x: 1.9; y: 3.3 } | |
36 |
X |
|
36 | XYPoint { x: 2.1; y: 2.1 } | |
37 |
X |
|
37 | XYPoint { x: 2.9; y: 4.9 } | |
38 |
X |
|
38 | XYPoint { x: 3.4; y: 3.0 } | |
39 |
X |
|
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 |
X |
|
53 | XYPoint { x: 1.1; y: 1.1 } | |
54 |
X |
|
54 | XYPoint { x: 1.9; y: 2.3 } | |
55 |
X |
|
55 | XYPoint { x: 2.1; y: 1.1 } | |
56 |
X |
|
56 | XYPoint { x: 2.9; y: 3.9 } | |
57 |
X |
|
57 | XYPoint { x: 3.4; y: 2.0 } | |
58 |
X |
|
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 |
X |
|
33 | XYPoint { x: 1.5; y: 1.5 } | |
34 |
X |
|
34 | XYPoint { x: 1.5; y: 1.6 } | |
35 |
X |
|
35 | XYPoint { x: 1.57; y: 1.55 } | |
36 |
X |
|
36 | XYPoint { x: 1.8; y: 1.8 } | |
37 |
X |
|
37 | XYPoint { x: 1.9; y: 1.6 } | |
38 |
X |
|
38 | XYPoint { x: 2.1; y: 1.3 } | |
39 |
X |
|
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 |
X |
|
54 | XYPoint { x: 2.0; y: 2.0 } | |
55 |
X |
|
55 | XYPoint { x: 2.0; y: 2.1 } | |
56 |
X |
|
56 | XYPoint { x: 2.07; y: 2.05 } | |
57 |
X |
|
57 | XYPoint { x: 2.2; y: 2.9 } | |
58 |
X |
|
58 | XYPoint { x: 2.4; y: 2.7 } | |
59 |
X |
|
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 |
X |
|
32 | XYPoint { x: 0; y: 0 } | |
33 |
X |
|
33 | XYPoint { x: 1.1; y: 2.1 } | |
34 |
X |
|
34 | XYPoint { x: 1.9; y: 3.3 } | |
35 |
X |
|
35 | XYPoint { x: 2.1; y: 2.1 } | |
36 |
X |
|
36 | XYPoint { x: 2.9; y: 4.9 } | |
37 |
X |
|
37 | XYPoint { x: 3.4; y: 3.0 } | |
38 |
X |
|
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 |
X |
|
52 | XYPoint { x: 1.1; y: 1.1 } | |
53 |
X |
|
53 | XYPoint { x: 1.9; y: 2.3 } | |
54 |
X |
|
54 | XYPoint { x: 2.1; y: 1.1 } | |
55 |
X |
|
55 | XYPoint { x: 2.9; y: 3.9 } | |
56 |
X |
|
56 | XYPoint { x: 3.4; y: 2.0 } | |
57 |
X |
|
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