Skip to content

Update Chart Component so that legend labels match the ordering of the stacked chart#3761

Merged
precious-onyenaucheya-ons merged 4 commits intomainfrom
feature/update-stacked-chart-to-no-be-reversed
Nov 27, 2025
Merged

Update Chart Component so that legend labels match the ordering of the stacked chart#3761
precious-onyenaucheya-ons merged 4 commits intomainfrom
feature/update-stacked-chart-to-no-be-reversed

Conversation

@precious-onyenaucheya-ons
Copy link
Copy Markdown
Contributor

@precious-onyenaucheya-ons precious-onyenaucheya-ons commented Nov 20, 2025

What is the context of this PR?

Addresses ONSDESYS-749

The legend order on stacked bar charts did not match the visual stacking order of the data, which caused accessibility issues. This has been fixed by setting reversedStacks to false in the chart configuration. this stacks series in the order they are defined in the data. The first series appears at the bottom (or left).

How to review this PR

  1. Open an example that shows a stacked chart eg stacked bar chart example.
  2. Check that the legend ordering now matches the stacking order of the data in the chart.
  3. Check that visual tests have been updated for this

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@netlify
Copy link
Copy Markdown

netlify bot commented Nov 20, 2025

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 5c153d1
🔍 Latest deploy log https://app.netlify.com/projects/ons-design-system-preview/deploys/69271dd250b08000089b080d
😎 Deploy Preview https://deploy-preview-3761--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@precious-onyenaucheya-ons precious-onyenaucheya-ons changed the title update so that stacked charts are orders properly Update Chart Component so that legend labels match the ordering of the stacked chart Nov 20, 2025
@precious-onyenaucheya-ons precious-onyenaucheya-ons added the Bug Something isn't working label Nov 20, 2025
@precious-onyenaucheya-ons precious-onyenaucheya-ons marked this pull request as ready for review November 20, 2025 16:19
@precious-onyenaucheya-ons precious-onyenaucheya-ons requested a review from a team as a code owner November 20, 2025 16:19
@precious-onyenaucheya-ons precious-onyenaucheya-ons merged commit d1880f7 into main Nov 27, 2025
14 of 17 checks passed
@precious-onyenaucheya-ons precious-onyenaucheya-ons deleted the feature/update-stacked-chart-to-no-be-reversed branch November 27, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants