DogStark / DogStark/petChain-Frontend

[Frontend] Repair Recharts pie-label typings in DataVisualizationDashboard

Open
#822 0 comments 0 reactions 0 assignees View on GitHub
bug frontend help wanted
Dominant language
TypeScript
Stars
3
Forks
158
Avg merge
3d 6h
Merged PRs (30d)
36

Description

## Problem

The chart reads a nonexistent region property and assumes percent is always defined, breaking TypeScript compilation.

## Relevant code

`src/components/analytics/DataVisualizationDashboard.tsx`

## Proposed scope

Use the supported PieLabelRenderProps contract, handle optional values, and add a render test covering incomplete chart data.

## Acceptance criteria

- [ ] The reported behavior is reproduced or characterized with a focused automated test before the fix.
- [ ] The implementation satisfies the proposed scope without weakening TypeScript, lint, authorization, privacy, or error handling.
- [ ] Success, empty/loading where applicable, failure, and boundary cases are covered.
- [ ] Existing related tests pass and new regression coverage is included.
- [ ] User-facing behavior remains accessible by keyboard and at mobile viewport sizes where UI is affected.
- [ ] Documentation is updated when the change alters configuration, contracts, security assumptions, or contributor workflow.

## Contributor notes

Base the work on the latest `main` branch. Keep unrelated refactors out of the pull request and include screenshots or recordings for visible changes. Never use real pet, medical, contact, wallet, or credential data in fixtures.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/components/analytics/DataVisualizationDashboard.tsx and inspect the pie-label rendering against the supported PieLabelRenderProps contract. Add a focused render test for incomplete chart data, then run the related tests and TypeScript checks. Done means optional values are handled without reading the nonexistent region property and the regression coverage passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.