iiitl / iiitl/StocksApp

[bug]: MPAndroidChart Displays "No chart data available

Open
#9 13 comments 0 reactions 0 assignees View on GitHub
bug hard help wanted
Dominant language
Kotlin
Stars
0
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### Problem Description
The Stock Details screen fails to render the line graph for the stock's price history, showing a yellow label instead.

### Expected Solution
The MPAndroidChart should display a filled line graph of the daily/weekly price trend.

### Steps to Reproduce
1. Launch the app.
2. Click any stock from the Top Gainers list.
3. Observe the empty space below the header.

### Proposed Fix
Investigate `StockViewModel.kt` to ensure the API response is correctly mapping to MPAndroidChart `Entry(x, y)` objects. Ensure the `LineDataSet` is properly attached and `chart.invalidate()` is called on the main thread.

### Concerned Files
* `detailsFragment.kt`
* `StockViewModel.kt`
* `fragment_details.xml`

---
### Acceptance Criteria
- [ ] Chart renders a line graph using the Alpha Vantage data.
- [ ] Chart scales correctly to fit the screen bounds.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the empty chart from the Stock Details screen, then inspect detailsFragment.kt, StockViewModel.kt, and fragment_details.xml. Trace the Alpha Vantage response into MPAndroidChart Entry objects and the LineDataSet. Done means a filled daily/weekly line graph renders and scales within the screen bounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.