Skip to content

[bug]: MPAndroidChart Displays "No chart data available #9

@Thunder-Blaze

Description

@Thunder-Blaze

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghardComplex refactoring, core logichelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions