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
8.38k stars 1.17k forks source link

perspective-viewer-d3fc: Double group-by in Y-Bar not grouping bars correctly #2453

Open mhkeller opened 10 months ago

mhkeller commented 10 months ago

Bug Report

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 Y-bar visualization
  3. Group by period and exam_subject

Expected Result:

I would expect the bars within each period group to not have any white space between them.

Here's an example from the d3fc website that I expect it to look similar to.

Screenshot 2023-11-26 at 10 15 51 PM

Actual Result:

The bars are evenly spaced, making the chart harder to read since each of the groups is not visually separate.

Screenshot 2023-11-26 at 9 47 49 PM

Environment:

"@finos/perspective": "^2.7.0",
"@finos/perspective-viewer": "^2.7.0",
"@finos/perspective-viewer-d3fc": "^2.7.0",
"@finos/perspective-viewer-datagrid": "^2.7.0",

Chrome 119 and Firefox 120

mhkeller commented 6 months ago

@timkpaine If you have any suggestions on what might be causing this bug, I can try to take a look.