Registry Mirror
Skip to content

Multiple Vincent/Vega charts in a popup? #1245

Open

Description

@robroc

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?

Activity

  1. dsunjka commented on Dec 3, 2020

    @dsunjka

    I am also interested - @robroc Did you come up with a solution in the meanwhile?

  2. robroc commented on Dec 3, 2020

    @robroc
    Author

    @dsunjka I was never able to solve this. I ended up using a different chart type that encodes the data from two charts in one.

  3. Conengmo commented on Nov 29, 2022

    @Conengmo
    Member

    The underlying issue that you currently can't add multiple children to a popup, only the last one added will be used. It would be good if we either fix that, or not make it fail silently.

    Same question as #1387

  4. added
    enhancement
    on Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions