Chirag
Chirag

Reputation: 111

Adding URL links in table charts

We have a Superset table that displays data based on an SQL query. Currently, all the data is rendered in HTML div/span tags.

We need to open a link in a new tab on click of one of the columns. If we send the raw link in anchor tag, it displays <a href={{link}}></a>, because the superset code wraps all the contents in a div/span tag.

Is there any way this can be done?

Upvotes: 11

Views: 10354

Answers (2)

Anugrah Prahasta
Anugrah Prahasta

Reputation: 97

As far as I know, you can't. All visualization on superset is based on d3. You might want to look for custom visualizations on their site.

Upvotes: -2

Hossein Torabi
Hossein Torabi

Reputation: 733

As far as superset use df.to_html to render the pandas data frames to Html on Dahsoborads Explore Tabs, you can use HTML tags and other on your queries. For example, I developed this simple query that generates a simple table of charts with CSV download links. Check This out:

  1. Write The query like this:

enter image description here

  1. Try to explore it(click on the explore button!):

enter image description here

Upvotes: 9

Related Questions