finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.72k stars 1.05k forks source link

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

Open mhkeller opened 3 months ago

mhkeller commented 3 months ago

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

texodus commented 3 months ago

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

mhkeller commented 1 week ago

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.

texodus commented 1 week ago

@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.

mhkeller commented 1 week ago

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.