href opening new browser window/tab
See original GitHub issueHello,
In the code below, is it possible to change the href behaviour to opening the URL in a new browser window/tab?
import altair as alt
from vega_datasets import data
from urllib.parse import urlencode
def make_google_query(name):
return "https://www.google.com/search?" + urlencode({'q': '"{0}"'.format(name)})
cars = data.cars()
cars['url'] = cars['Name'].apply(make_google_query)
alt.Chart(cars).mark_circle(size=60).encode(
x='Horsepower',
y='Miles_per_Gallon',
color='Origin',
href='url',
tooltip=['Name', 'url']
)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to Open a Link in a New Tab – HTML target blank ...
You can use the target="_blank" attribute if you want your users to click on a link that opens up a new browser tab....
Read more >How to Make Links Open in a New Window or Tab
How to Open Hyperlinks in a New Browser Tab or Window ... The short answer is: just add a target="_blank" attribute to your...
Read more >Open link in new tab or window [duplicate]
Using _blank will tell the browser to use a new tab/window, depending on the user's browser configuration and how they click on the...
Read more >The a target attribute
If you set the target attribute to "_blank", the link will open in a new browser window or a new tab.
Read more >HTML link in a new window
Open a link in a new window or tab. In order to open a link in a new window / tab, add target="_blank"...
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 FreeTop 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
Top GitHub Comments
Answered on SO: https://stackoverflow.com/questions/72238350/how-to-open-url-from-altair-chart-in-a-new-tab-href/, you can set the
usermeta
on the chart dictionary:No, there’s no way to do this, unfortumately. See https://github.com/vega/vega-lite/issues/3795