Cursor param not support in axes
See original GitHub issueIn this graph, the mouse cursor changes to “wait” on hover over bars, but remains an arrow for different axes elements. Ideally, it should be possible to set the custom cursor over the whole axes area (otherwise the blank area between labels will not be configurable), but even setting it over the axes elements should work.
{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"width": 400,
"height": 200,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"u": 1, "v": 28}, {"u": 2, "v": 55},
{"u": 3, "v": 43}, {"u": 4, "v": 91}
]
}
],
"scales": [
{
"name": "xscale",
"type": "band",
"range": "width",
"domain": {"data": "table", "field": "u"}
},
{
"name": "yscale",
"type": "linear",
"range": "height",
"domain": {"data": "table", "field": "v"},
"zero": true,
"nice": true
}
],
"axes": [
{
"orient": "bottom", "scale": "xscale",
"encode": {
"labels": {"enter": {"cursor": {"value": "ew-resize"}}},
"ticks": {"enter": {"cursor": {"value": "wait"}}},
"domain": {"enter": {"cursor": {"value": "wait"}}}
}
},
{"orient": "left", "scale": "yscale"}
],
"marks": [
{
"type": "rect",
"from": {"data": "table"},
"encode": {
"enter": {
"cursor": {"value": "wait"},
"x": {"scale": "xscale", "field": "u", "offset": 1},
"width": {"scale": "xscale", "band": 1, "offset": -1},
"y": {"scale": "yscale", "field": "v"},
"y2": {"scale": "yscale", "value": 0},
"fill": {"value": "steelblue"}
}
}
}
]
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
The value axis' tooltip is not following the cursor position #443
While using a Line Chart , I've added a tooltip for both my date and value axis. While the date tooltip is following...
Read more >can cursors be passed with parameters at execution time
I am a little rusty with PLSQL, but I think that the command to get the next record is FETCH , not GET...
Read more >Custom GINPUT - File Exchange - MATLAB Central - MathWorks
[X,Y] = ginputc(N) gets N points from the current axes and returns the X- and Y-coordinates in length N vectors X and Y....
Read more >matplotlib.axes.Axes.annotate — Matplotlib 3.6.2 documentation
The properties used to draw a FancyArrowPatch arrow between the positions xy and xytext. Defaults to None, i.e. no arrow is drawn. For...
Read more >Undocumented mouse pointer functions
moveptr is only available in Matlab 7, not Matlab 6. · moveptr also has a bug/limitation (fixed in R2008a) in that it expects...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@arvind: The problem was that Vega was expecting the name/interactive properties for the top-level group to be defined as top-level axis properties. I think this is confusing and inconsistent so I’ve removed the top-level properties and ensured that all custom encode groups behave the same way. This has now been released with the latest versions of both vega and vega-parser.
@jheer: It doesn’t seem like the
axisproperty is actually having an effect. E.g.,