Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add real stock price values on chart #508

Merged
merged 5 commits into from
Dec 15, 2024
Merged

Conversation

hikasap
Copy link
Contributor

@hikasap hikasap commented Dec 15, 2024

Previously, the stock chart used randomly generated data for visualization, which was not reflective of real market data. This update fetches actual stock price data from the API, allowing for more accurate and meaningful stock charts. This change will improve the user experience by providing real-time data visualization, helping users track stock prices and trends.

Key Changes:

  • Stock Data Fetching: Replaced random data generation with an API call to fetch historical stock data based on selected time periods (1D, 1W, 1M, 1Y).
  • State Management: Simplified state management by removing unnecessary data generation logic and relying entirely on the fetched API data for chart rendering.
  • Chart Rendering: Integrated the fetched data into the chart rendering logic using the lightweight-charts library.
  • Code Cleanup: Removed unused functions and unnecessary state variables to improve readability and maintainability of the code.

Screenshots:

Screenshot 2024-12-15 at 19 54 51

@hikasap hikasap added the frontend issue related with frontend label Dec 15, 2024
@hikasap hikasap self-assigned this Dec 15, 2024
@hikasap hikasap added this to the 451 - Milestone 3 milestone Dec 15, 2024
@m-erkam
Copy link
Contributor

m-erkam commented Dec 15, 2024

Stock prices are fetched correctly and shown in the linechart nicely. I am merging the pr

@m-erkam m-erkam merged commit 8a4c893 into dev Dec 15, 2024
@hikasap hikasap linked an issue Dec 20, 2024 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend issue related with frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] Integrate Stock Details Page with API Data
2 participants