Skip to content

LIG-10247 Add reusable multi-series bar chart#1696

Draft
ikondrat wants to merge 1 commit into
kondrat-lig-10239-frontend-sample-tag-comparison-selection-and-query-wiringfrom
kondrat-lig-10247-frontend-reusable-multi-series-bar-chart-primitive
Draft

LIG-10247 Add reusable multi-series bar chart#1696
ikondrat wants to merge 1 commit into
kondrat-lig-10239-frontend-sample-tag-comparison-selection-and-query-wiringfrom
kondrat-lig-10247-frontend-reusable-multi-series-bar-chart-primitive

Conversation

@ikondrat

Copy link
Copy Markdown
Contributor

Summary

  • extend BarChart with an optional, backward-compatible named-series model
  • render grouped bars on a shared category axis in horizontal and vertical orientations
  • derive stable series colours from series IDs
  • add a scrollable ECharts legend and series-aware grouped tooltip
  • zero-fill absent category values defensively
  • expand the scroll extent as the number of series grows
  • register the legend component in existing chart test mocks

Stack

This split keeps the reusable chart change below the requested 150-line threshold.

Testing instructions

  1. Check out this branch with the preceding stack.
  2. Run:
    cd lightly_studio_view
    make static-checks
    npm run test:unit -- --run \
      src/lib/components/BarChart/buildEchartsOption.test.ts \
      src/lib/components/BarChart/BarChart.test.ts \
      src/lib/components/DatasetDistributionPanel/DatasetDistributionPanel.test.ts \
      src/lib/components/DatasetDistributionPanel/ExpandDialog/ExpandDialog.test.ts
  3. Pass multiple CategoryCountSeries values to a BarChart and verify grouped bars, legend scrolling, tooltips, both orientations, and chart overflow.
  4. Remove series and verify the existing single green series and percentage tooltip are unchanged.

Validation

  • make static-checks: passed
  • 43 focused unit tests: passed

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c4740610-4cdc-4f70-bd05-2c5ec8e77147

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kondrat-lig-10247-frontend-reusable-multi-series-bar-chart-primitive

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Successfully merging this pull request may close these issues.

1 participant