-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support axis labelHref #4148
Comments
Related to #1657 |
Is there a way to get this behavior with just Vega right now? I tried something like: <VegaLite ... onNewView={v => v.addEventListener('@legendLabel:click', ...)} /> However, according to vega/vega#352 you can only listen to primitive events like Is there maybe some indirect way where I can define a signal and listen to the signal? I tried this too: <VegaLite
...
patch={spec => {
spec.signals.push({
name: "foobar",
value: null,
on: [{events: "@legendSymbol:click @legendLabel:click",
update: '{value: datum.value}',
force: true}]
})
return spec;
}}
signalListeners={{
"foobar": (e) => {
console.log('test', e);
}
}}
/> But no luck either. |
@domoritz It's probably fair to add |
I wonder whether it would be better to support labelHref in Vega directly rather than only Vega-Lite. |
would be a nice feature :) |
Purpose:
Enable href navigation when user clicks on axis label
Explanation:
vega/vega-lite already has some form of interactivity. Interaction is mostly based on point selection. This feature proposes adding in interactivity to the axis labels. While my immediate desire is to enable href on axis', conditional highlighting or label selection might be nice as well.
Possible Spec:
The text was updated successfully, but these errors were encountered: