Improve tooltip dragging in energy charts
This commit is contained in:
parent
c30b213b52
commit
d8302cf86d
@ -388,7 +388,7 @@ StatsBase {
|
||||
backgroundRect: Qt.rect(chartView.plotArea.x + toolTip.x, chartView.plotArea.y + toolTip.y, toolTip.width, toolTip.height)
|
||||
|
||||
property int idx: Math.floor(mouseArea.mouseX * categoryAxis.count / mouseArea.width)
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
|
||||
x: Math.min(idx * mouseArea.width / categoryAxis.count, mouseArea.width - width)
|
||||
property double setMaxValue: {
|
||||
|
||||
@ -269,12 +269,12 @@ Item {
|
||||
width: 1
|
||||
color: Style.foregroundColor
|
||||
x: mouseArea.mouseX
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
}
|
||||
|
||||
NymeaToolTip {
|
||||
id: toolTip
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
|
||||
backgroundItem: chartView
|
||||
backgroundRect: Qt.rect(mouseArea.x + toolTip.x, mouseArea.y + toolTip.y, toolTip.width, toolTip.height)
|
||||
|
||||
@ -343,7 +343,7 @@ StatsBase {
|
||||
backgroundRect: Qt.rect(chartView.plotArea.x + toolTip.x, chartView.plotArea.y + toolTip.y, toolTip.width, toolTip.height)
|
||||
|
||||
property int idx: Math.floor(mouseArea.mouseX * categoryAxis.count / mouseArea.width)
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
|
||||
x: Math.min(idx * mouseArea.width / categoryAxis.count, mouseArea.width - width)
|
||||
property double setMaxValue: d.consumptionSet && d.productionSet && d.acquisitionSet && d.returnSet ?
|
||||
|
||||
@ -260,13 +260,13 @@ Item {
|
||||
width: 1
|
||||
color: Style.foregroundColor
|
||||
x: mouseArea.mouseX
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
}
|
||||
|
||||
|
||||
NymeaToolTip {
|
||||
id: toolTip
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
|
||||
backgroundItem: chartView
|
||||
backgroundRect: Qt.rect(mouseArea.x + toolTip.x, mouseArea.y + toolTip.y, toolTip.width, toolTip.height)
|
||||
|
||||
@ -252,12 +252,12 @@ Item {
|
||||
width: 1
|
||||
color: Style.foregroundColor
|
||||
x: mouseArea.mouseX
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
}
|
||||
|
||||
NymeaToolTip {
|
||||
id: toolTip
|
||||
visible: mouseArea.containsMouse
|
||||
visible: mouseArea.containsMouse || mouseArea.preventStealing
|
||||
|
||||
backgroundItem: chartView
|
||||
backgroundRect: Qt.rect(mouseArea.x + toolTip.x, mouseArea.y + toolTip.y, toolTip.width, toolTip.height)
|
||||
|
||||
Reference in New Issue
Block a user