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

Tooltips bug #176

Closed
AndreiKingsley opened this issue Apr 17, 2023 · 12 comments
Closed

Tooltips bug #176

AndreiKingsley opened this issue Apr 17, 2023 · 12 comments
Assignees

Comments

@AndreiKingsley
Copy link
Contributor

Tooltips for columns that mapped on x and y are displayed incorrectly
image

@alshan
Copy link
Collaborator

alshan commented Apr 17, 2023

Taking in account that mapping y = "b" is ignored (unless stat=identity), this is likely an expected behavior.
@AndreiKingsley, what were you expecting in the tooltip?

@AndreiKingsley
Copy link
Contributor Author

Taking in account that mapping y = "b" is ignored (unless stat=identity), this is likely an expected behavior. @AndreiKingsley, what were you expecting in the tooltip?

Column names ("a", "b) on the left side of tooltips, just like for "c".

@alshan
Copy link
Collaborator

alshan commented Apr 19, 2023

I see, at first I thought your complain is about tooltip showing "c: a1" instead of "c: b2" :)

Macro '@' substituted with a default title for given aesthetic, which is <empty> for 'positional' aesthetics x/y.
@OLarionova-HORIS am I correct?

@AndreiKingsley
Copy link
Contributor Author

But why is it empty?

@AndreiKingsley
Copy link
Contributor Author

Is there any sense in this behavior?

@OLarionova-HORIS
Copy link
Contributor

Macro '@' substituted with a default title for given aesthetic, which is for 'positional' aesthetics x/y.
@OLarionova-HORIS am I correct?

Yes, we don't show the default title for positional variables.
But it's possible to specify the title explicitly: .line("title for a|@a").line("title for b|@b")

@alshan
Copy link
Collaborator

alshan commented Apr 20, 2023

May be we can invert this situation and for the setting .line("@|@a") render the tooltip line as

title value

unconditionally?
And let the user to remove the title if necessary using .line("|@a") ?

@AndreiKingsley
Copy link
Contributor Author

May be we can invert this situation and for the setting .line("@|@a") render the tooltip line as

title value

unconditionally? And let the user to remove the title if necessary using .line("|@a") ?

Seems great!

@OLarionova-HORIS
Copy link
Contributor

OLarionova-HORIS commented Apr 21, 2023

So the expected behaviour should be the following:

  • .line(@|^aesName).line(@|@varName) => always "title value"
  • .line(|^aesName).line(|@varName) => always "value"

But what about titles for positionals x/y in the following situations:

  • without specified tooltips
  • tooltips are set via variable list: layerTooltips( "a", "b" )

Now we use empty titles for them.

@alshan
Copy link
Collaborator

alshan commented Apr 21, 2023

without specified tooltips
tooltips are set via variable list: layerTooltips( "a", "b" )

I think, in the case of multiline tooltip it's preferable to show title regardless of the kind of the aesthetic.

@alshan
Copy link
Collaborator

alshan commented Apr 24, 2023

tooltips are set via variable list: layerTooltips( "a", "b" )

Another way to look at it:

layerTooltips( "a", "b" )

is equivalent to

layerTooltips()
  .line("@|@a")
  .line("@|@b")

@alshan
Copy link
Collaborator

alshan commented May 10, 2023

Fixed in LPK v4.4.0

@alshan alshan closed this as completed May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants