How to move marker along line based on cursor position? #201
-
I want to move a dot along Is there maybe a function to get the Y value based on the value of X (so in this case vg.ruleX({ x: $point }),
vg.lineY(vg.from("stocks", { filterBy: query }), {
x: "Date",
y: "Open",
stroke: "steelblue",
}),
vg.nearestX({ as: $point }),
vg.dot({ x: $point, fill: "steelblue" }), |
Beta Was this translation helpful? Give feedback.
Answered by
domoritz
Dec 13, 2023
Replies: 1 comment 1 reply
-
I didn't have time to build up an example but you could try to build a query that computes y based on the Something like vg.Query.from("stocks")
.select({ y: "Open" })
.where($point.predicate()) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rickiesmooth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't have time to build up an example but you could try to build a query that computes y based on the
$point
.Something like