the href encoding
See original GitHub issueHi Jake and all,
Is the href encoding supported in Altair? I can’t tell by the docs how I would use it. Vega lite docs uses “as” in the spec and of course that is a key work in Python:
{
"data": {"url": "data/cars.json"},
"mark": "point",
"transform": [{
"calculate": "'https://www.google.com/search?q=' + datum.Name", "as": "url"
}],
"encoding": {
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"},
"color": {"field": "Origin", "type": "nominal"},
"tooltip": {"field": "Name", "type": "nominal"},
"href": {"field": "url", "type": "nominal"}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
HTML URL Encoding Reference - W3Schools
Character From Windows‑1252 From UTF‑8
space %20 %20
! %21 %21
" %22 %22
Read more >how to encode href attribute in HTML - Stack Overflow
Construct a URL as normal. Follow the rules for constructing URLs. Encode data you put into it. Then construct HTML as normal.
Read more >How to Perform URL Encoding in HTML? (Example) - eduCBA
How to Perform URL Encoding in HTML? · HTML language creates URL using <a> tag and href attribute. · Some characters are restricted...
Read more >HTML - URL Encoding - Tutorialspoint
Decimal Hex Value Character URL Encode
128 80 € %80
129 81 %81
130 82 ‚ %82
Read more >HTML URL-encoding Reference - ESO.org
HTML URL-encoding Reference. Below is a reference of ASCII characters in URL-encoding form (hexadecimal format). Hexadecimal values can be used to display ...
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
Yes, it is supported. For example, here we modify a scatter plot of car properties so that clicking on any point opens a google search for the car name:
This would probably be worth adding as an example in the docs
In case this helps anyone else:
I didn’t feel that was good enough for my use case – I really want there to be no active hyperlink when there is no href.
In my case it seems to work well to make two charts, and add them to together: