Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[time table] add tooltip to sparkline #3767

Merged

Conversation

williaster
Copy link
Contributor

@mistercrunch @graceguo-supercat

This PR

  • bumps @data-ui/sparkline to 0.0.47 where I added tooltip support
  • adds tooltips to the timeseries table sparkline that display value + date
  • opens the link for url in the timeseries table in a new tab

sparkline-tooltip-v0

Tested sparkline functionally (see screenshot) and tested url opening in new tab functionally for group by + non-group by combos, and with new mocha test

@coveralls
Copy link

coveralls commented Nov 3, 2017

Coverage Status

Coverage remained the same at 71.271% when pulling 101f088 on williaster:chris--sparkline-tooltip into 7fd9c82 on apache:master.

@@ -53,13 +54,12 @@ function viz(slice, payload) {
}
const tableData = metrics.map((metric) => {
let leftCell;
const context = Object.assign({}, fd, { metric });
const url = fd.url ? Mustache.render(fd.url, context) : null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was Mustache removed? The url needs to be rendered with the context (to interpret something like {{ metric }}).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhh, yeah I didn't understand what this was doing fully/thought it was forcing the url to be within the app. added it back.

@michellethomas
Copy link
Contributor

this lgtm

@coveralls
Copy link

coveralls commented Nov 3, 2017

Coverage Status

Coverage remained the same at 71.271% when pulling 41786df on williaster:chris--sparkline-tooltip into 7fd9c82 on apache:master.

@graceguo-supercat graceguo-supercat merged commit 7f3edad into apache:master Nov 3, 2017
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* [time table] add tooltip to sparkline

* [time table] open link in new tab

* [time table] add back Mustache
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* [time table] add tooltip to sparkline

* [time table] open link in new tab

* [time table] add back Mustache
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.5 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants