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

Improve DataFrame / plotting tooltips #1118

Open
martinfalk opened this issue Mar 1, 2021 · 14 comments
Open

Improve DataFrame / plotting tooltips #1118

martinfalk opened this issue Mar 1, 2021 · 14 comments
Assignees

Comments

@martinfalk
Copy link
Contributor

When plotting a DataFrame and hovering a data point, the tooltip shows data from all columns. In case of large data frames this becomes excessive and results in tooltips covering most of the screen.

Suggestion:

  • mark only certain columns to be shown in the tooltip instead of all
    • either on a DataFrame basis (use DataFrame's MetaData?)
    • or in plot processor (select "visible" columns)
  • make tooltips optional in all plotting processors
@martinfalk
Copy link
Contributor Author

@petersteneteg @ResearchDaniel @AnkeAnke comments?

@petersteneteg
Copy link
Member

how many columns are we talking about?

@petersteneteg
Copy link
Member

I think one might have a string property for a format string for the tooltip in the processor. And we might have some predefined names for the header/data for each column.

"{header0}: {value0}\n{header1}: {value1}\n{header2}: {value2}\n"

Or something along those lines. With some resonable defaults.

@ResearchDaniel
Copy link
Contributor

Different plots may want to display different details.
I think that we should go with:

  • mark only certain columns to be shown in the tooltip instead of all in plot processor (select "visible" columns)

A format string could also be useful so that one can decide the number of decimals and add the unit for example.
A tooltip property with these options could potentially do the trick

@petersteneteg
Copy link
Member

I don't think marking data frame columns is a good way to go. How would you encode that in a csv file for example? Makes little sense to put the rendering semantics into the data. Different renderers might also want to show different information.

@ResearchDaniel
Copy link
Contributor

Agree, to clarify I meant that each plot decides which columns to show. That could be done by marking the columns in the GUI with optional formatting using a new “tooltip property”

@petersteneteg
Copy link
Member

ok. I would want to avoid having to make a long list if bool properties that is just show in tooltiip or not, that seems very verbose, and since the problem was having many columns, the solution should ideally not be linear with the number of columns...

@martinfalk
Copy link
Contributor Author

I like @petersteneteg's suggestion with the formatting string. Maybe add a button to include all columns (kind of the "default" state). Alternatively, a BoolProperty "Show All Columns in Tooltip".

@martinfalk
Copy link
Contributor Author

how many columns are we talking about?

20+ columns. In my case I had 30 columns.

@ResearchDaniel
Copy link
Contributor

Here is how Vega does it (per plot, specify which columns along with its type, optional title):
https://vega.github.io/vega-lite/docs/tooltip.html
I guess that can be achieved quite nicely, and possibly easier, with a format string

@petersteneteg
Copy link
Member

A dropdown menu that prefil the format string with some resonable default might be nice. How does 30 lines fill the entire screen? One can also add multiple "columns" to the tool tip to allow show more content...
One could also consider some kind of format mini DSL to set formats for different columns:

size -> "{header}: {value:05}"
speed.* ->  "{header}: {value:5.5f}"
stupid.* -> ""
.* -> "{header}: {value}"

In a multi line string property. That would then be matched and applied for each column, that would be both small, easy to use, flexible, and scale to very many columns.

@martinfalk
Copy link
Contributor Author

@petersteneteg

With windows UI scaling 150% (3000x2000)
image

UI scaling 100% (2560x1440)
image

@petersteneteg
Copy link
Member

splitting that in 2-3 columns might be useful... unless the data frame has pointless data in it. I think it often is quite nice to be able to see all the data for a point... in many cases you don't know beforehand which data will be the relevant one...

@martinfalk
Copy link
Contributor Author

splitting that in 2-3 columns might be useful... unless the data frame has pointless data in it. I think it often is quite nice to be able to see all the data for a point... in many cases you don't know beforehand which data will be the relevant one...

Agreed. But in the specific case you want to limit them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants