perspective icon indicating copy to clipboard operation
perspective copied to clipboard

Tooltip in x/y line chart shows `-` and `NaN`

Open mhkeller opened this issue 1 year ago • 6 comments

Bug Report

When creating a multi-series line chart, the values display correctly in the chart but y value shows up as NaN in a tooltip and x value is repeated and shows up as -.

Steps to Reproduce:

  1. Load this dummy data of student exams in different subjects and periods: https://gist.github.com/mhkeller/8831f579f814af2a7415e043457d4e56
  2. Select the X/Y line visualization
  3. Group by exam_month, split by exam_subject, set the x axis to exam_month (any) and the y axis to exam_score (avg)

Expected Result:

I'd expect to see the proper x and y-value in the tooltip.

Actual Result:

I see NaN in the tooltip for exam_score and exam_month shows up twice: once as the proper value and once as -.

Environment:

2.9.0 reproduced at https://perspective.finos.org/block/?example=file

Additional Context:

Screenshot 2024-03-20 at 13 38 34

mhkeller avatar Mar 20 '24 17:03 mhkeller

Thanks for the report - I'm pretty sure this is the same behavior described in #2254, let me take a look and I will update

texodus avatar Mar 21 '24 14:03 texodus

Just wanted to check in on this and offer to take a look if you had some pointers on what code might be affecting this. I'm doing a data training next month and wanted to show this as an example.

mhkeller avatar Jun 25 '24 19:06 mhkeller

@mhkeller I appreciate the enthusiasm but finding the issue is 90% of the work.

The master branch of this repo has already been updated for the 3.0 release and is not backwards compatible, so any fix for this will need to wait at least as long as this release, but I will make sure this fix is in by then.

texodus avatar Jun 25 '24 20:06 texodus

Understood – and if I'm able to offer anything more than enthusiasm, I'll add a comment here. I'll start by getting a dev environment set up and see if there's any insight I can provide.

mhkeller avatar Jun 25 '24 20:06 mhkeller

@mhkeller I appreciate the enthusiasm but finding the issue is 90% of the work.

The master branch of this repo has already been updated for the 3.0 release and is not backwards compatible, so any fix for this will need to wait at least as long as this release, but I will make sure this fix is in by then.

Hi @texodus,

I am able to reproduce this bug in version 3.0.3. I note that it has been added to the 3.0 milestone, however, I don’t see any in-progress draft PRs regarding this issue, so I’d like to contribute a fix for it.

Is it okay if I proceed with this?

wakek avatar Sep 04 '24 13:09 wakek

Please read the CONTRIBUTING.md:

Don't ask for issues to be assigned to you if you're a first-time contributor.

If you can fix this without assistance, just do it and open a PR - if you cannot, don't ask.

texodus avatar Sep 04 '24 13:09 texodus