python-visualization / python-visualization/folium
Multiple Vincent/Vega charts in a popup?
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 2.3k
- Avg merge
- 17h 22m
- Merged PRs (30d)
- 11
Description
I'm trying to add two Vincent bar charts in a popup using Vega, one on top of the other. The two methods below are not working:
# Adding both charts to add_child: This only renders the first chart
m.add_child( folium.CircleMarker(
location = [df['latitude'], df['longitude']],
popup = folium.Popup(max_width = 450).add_child(chart1, chart2)
))
# Method-chaining: This only renders the second chart
m.add_child( folium.CircleMarker(
location = [df['latitude'], df['longitude']],
popup = folium.Popup(max_width = 450).add_child(chart1, name = 'c1').add_child(chart2, name = 'c2')
) )
Is there a way to accomplish this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Popup.add_child from the two examples in the issue and inspect how popup children are rendered. The work is done when a single popup reliably displays both Vincent/Vega charts rather than only the first or second chart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100