-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChart.qml
72 lines (69 loc) · 1.96 KB
/
Chart.qml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import CustomComponents 1.0
import Qt 4.7
Rectangle {
id: canvas
width: 800
height: 480
color: "#111111"
property color textColor: "white"
property int fontSize: 6
// Some nice lines
Repeater {
id: horizontalLines
anchors.fill: parent
model: 14
Rectangle {
width: 1
height: canvas.height
color: { index == 7 ? "#77CCCCCC" : "#44CCCCCC" }
x: canvas.width / 14 * index
y: 0
}
}
Repeater {
id: verticalLines
anchors.fill: parent
model: 10
Rectangle {
width: canvas.width
height: 1
color: { index == 5 ? "#77CCCCCC" : "#44CCCCCC" }
x: 0
y: canvas.height / 10 * index
}
}
Text {
id: horizontalMin
color: parent.textColor
font.pointSize: parent.fontSize
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.leftMargin: font.pixelSize * 1.5
// text: { Math.round(parent.curves[0].getHorizontalMin(), 2) }
}
Text {
id: horizontalMax
color: parent.textColor
font.pointSize: parent.fontSize
anchors.right: parent.right
anchors.bottom: parent.bottom
// text: { Math.round(parent.curves[0].getHorizontalMin() + parent.curves[0].getHorizontalSpan()) }
}
Text {
id: verticalMin
color: parent.textColor
font.pointSize: parent.fontSize
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.bottomMargin: font.pixelSize*1.5
// text: { Math.round(parent.curves[0].getVerticalMin()) }
}
Text {
id: verticalMax
color: parent.textColor
font.pointSize: parent.fontSize
anchors.top: parent.top
anchors.left: parent.left
// text: { Math.round(parent.curves[0].getVerticalMin() + parent.curves[0].getVerticalSpan()) }
}
}