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

Update design of tooltips #4156

Closed
corywatilo opened this issue Apr 29, 2021 · 17 comments · Fixed by #4751
Closed

Update design of tooltips #4156

corywatilo opened this issue Apr 29, 2021 · 17 comments · Fixed by #4751
Assignees
Labels
design Issues that need a designer's attention

Comments

@corywatilo
Copy link
Contributor

corywatilo commented Apr 29, 2021

EDIT: This issue now encompasses only the UI/implementation for tooltips only. The main chart components are encompassed in #4758.

At @paolodamico's request, I put some thought into making graphs more visually appealing. After some research, I landed on this:

image

@corywatilo corywatilo added design Issues that need a designer's attention core-experience labels Apr 29, 2021
@paolodamico
Copy link
Contributor

I absolutely love this!! CC @samwinslow @EDsCODE, what are your thoughts on this? We could add this next.

@samwinslow
Copy link
Contributor

I don't think it would be too hard to add a gradient to the graph shape, but if we're changing it anyway, this library looks super cool: https://airbnb.io/visx/gallery — it's also very declarative in its code style.

@EDsCODE
Copy link
Member

EDsCODE commented Apr 29, 2021

I think this would be a great improvement! The one thing I would anticipate is slightly tricky is the tooltip styling and maybe the vertical line on hover but I could be mistaken. (Just inferring from the limitations we have using chartjs).

One extra thing we could have a better visual of is this case when there are a ton of lines. We have the legend that allows you to toggle lines on and off but when you're hovering perhaps we should hide/grey out lines that aren't in focus?
Screen Shot 2021-04-29 at 9 44 00 AM

@samwinslow
Copy link
Contributor

Tooltips + vertical line actually seem pretty easy:

Screen Shot 2021-04-29 at 9 52 16 AM

@EDsCODE
Copy link
Member

EDsCODE commented Apr 29, 2021

Ohh if we're keen on changing libraries for sure

@samwinslow
Copy link
Contributor

Sub-issue: #4344

@samwinslow
Copy link
Contributor

samwinslow commented May 25, 2021

Progress update: Managed to get this going without switching chart libraries!

Screen Shot 2021-05-25 at 12 08 55 PM

TODO (somewhat of a note-to-self):

  • Day format on axis labels & tooltip
  • Icon on "Click" CTA
  • Add PropertyKeyInfo so that tooltip doesn't show things like $pageview
  • Bugfix overlapping chart series for "predicted" values — shows duplicate entries in tooltip
  • Revert to small inline numbers
  • Add Tags (Unique Users, Total [shown only if multiple series])
  • Table revamp (separate issue)
  • Max-height and scrollable box

@paolodamico
Copy link
Contributor

Love this, looking great @samwinslow! Wonder if we can add the subtle background too with this library.

@samwinslow
Copy link
Contributor

@corywatilo Do you have any advice for how to make this look better at a very high data density?

Eric suggested having each line isolate itself by reducing the opacity of the other lines on hover; but this isn't an ideal approach IMO because it kind of defeats the purpose of the scrubber bar, which is great for comparing data.

From user feedback, it was annoying to mouse over different specific areas of the screen such as individual points; having each line have a separate hover-scrubber interaction would introduce this same problem again.

For example, pretend all these datasets have different filters.

Screen Shot 2021-05-25 at 3 48 04 PM

It starts looking ugly when more verbose filters are applied... would you mind mocking up a typography treatment with this in mind?

Screen Shot 2021-05-25 at 3 52 12 PM

@paolodamico
Copy link
Contributor

For starters I think we can simplify the text (e.g. "Pageview ($current_url ..."), I was actually going to work on an issue today just to work out how to improve that copy in a way that makes sense for non-technical users too. If you can give me a couple of hours here, might be able to help.

@samwinslow
Copy link
Contributor

@paolodamico Just pushed another commit which makes the filter property keys human-readable; that part is pretty simple.

Previously I introduced the disableIcon prop for PropertyKeyInfo, so can render <PropertyKeyInfo disableIcon value={someString} /> and it will humanize the text if such a value is known.

I wonder if there's a better way to represent the string Event Title (Aggregation) (Key = Value, ...). Maybe antd Tag instead of parentheses?

@paolodamico
Copy link
Contributor

Which branch/PR? But yeah, let me explore a little bit and get back to you on this.

@samwinslow
Copy link
Contributor

Which branch/PR? But yeah, let me explore a little bit and get back to you on this.

4156-improved-graphs is the branch and 4156-new-graph-ui is the feature flag to enable.

@paolodamico
Copy link
Contributor

Here's my stab at tooltips following the proposal on #4492 in terms of series naming conventions. I also account for the possibility of having a ton of different series in the same graph. Figma.

Simple breakdown

base

Multiple series

multiple-series

Multiple series with breakdown

multiple-series-breakdown

@corywatilo
Copy link
Contributor Author

Related: Mocked up a version with multiple plotted lines in #4514, each with a fill being a gradient using the primary color of the line. (Figma mock for reference)

Note: Probably use new line styles, not specific colors from this linked conceptual mock.

@samwinslow
Copy link
Contributor

Screenshot showing tooltip and legend adjustments, including Series badge. Almost all of this can be reused regardless of charting library -- Check out branch 4156-improved-graphs and feature flag 4156-new-graph-ui!

Screenshot from 2021-06-03 20-34-56

paolodamico added a commit that referenced this issue Jun 14, 2021
@paolodamico paolodamico changed the title Update design of graphs, tooltips Update design of tooltips Jun 15, 2021
@paolodamico
Copy link
Contributor

Released FF right now for users only in PostHog Cloud: PostHog Team, Beta Users & 20% of user base.

mariusandra pushed a commit that referenced this issue Jul 21, 2021
* release InsightsTableV2

* release graphs new UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Issues that need a designer's attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants