|
@@ -114,15 +114,16 @@ Rectangle {
|
|
bottom: background.bottom
|
|
bottom: background.bottom
|
|
left: parent.left
|
|
left: parent.left
|
|
}
|
|
}
|
|
- width: graph.fontSize * 3
|
|
|
|
|
|
+ width: MoreMath.maxWidth(children) + graph.fontSize
|
|
|
|
|
|
Repeater {
|
|
Repeater {
|
|
|
|
+ id: verticalRepeater
|
|
|
|
+
|
|
model: graph.verticalScalaCount
|
|
model: graph.verticalScalaCount
|
|
|
|
|
|
Label {
|
|
Label {
|
|
- x: 0
|
|
|
|
- width: verticalScala.width - graph.fontSize / 3
|
|
|
|
- y: background.scaleY(255 / (graph.verticalScalaCount - 1) * index) - graph.fontSize / 2
|
|
|
|
|
|
+ x: verticalScala.width - implicitWidth - graph.fontSize / 3
|
|
|
|
+ y: background.height - background.height / (graph.verticalScalaCount - 1) * index - graph.fontSize / 2
|
|
horizontalAlignment: Text.AlignRight
|
|
horizontalAlignment: Text.AlignRight
|
|
color: graph.pal.text
|
|
color: graph.pal.text
|
|
text: index * (100 / (graph.verticalScalaCount - 1)) + "%"
|
|
text: index * (100 / (graph.verticalScalaCount - 1)) + "%"
|
|
@@ -144,8 +145,8 @@ Rectangle {
|
|
model: graph.horIntervals.length;
|
|
model: graph.horIntervals.length;
|
|
|
|
|
|
Label {
|
|
Label {
|
|
- x: Math.min(horizontalScala.width, background.scaleX(Units.toCelsius(graph.horIntervals[index]), root.unit)) - width / 2
|
|
|
|
- y: graph.fontSize / 2
|
|
|
|
|
|
+ x: Math.min(horizontalScala.width, background.width / (graph.horIntervals.length - 1) * index) - width / 2
|
|
|
|
+ y: horizontalScala.height / 2 - implicitHeight / 2
|
|
color: graph.pal.text
|
|
color: graph.pal.text
|
|
text: graph.horIntervals[index] + graph.suffix
|
|
text: graph.horIntervals[index] + graph.suffix
|
|
font.pixelSize: graph.fontSize
|
|
font.pixelSize: graph.fontSize
|