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

[BugFix] Enforce User Preference For Dark/Light Mode In Chart Output To API #6664

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

deeleeramone
Copy link
Contributor

  1. Why?:

    • The charting extension is relying on the output at runtime to set the user preference theme, this was excluding the API from being set by this preference.
  2. What?:

    • Sets plot_bgcolor, paper_bgcolor and font_color as white/black according to the user-defined preference in user_settings.json, "chart_style".
    • This is done at the chart function level, prior to the layout_kwargs entry at output, and remains settable at runtime.
  3. Impact:

    • Charts output from the API should now be consistent with the Python output.
  4. Testing Done:

    • Define the preference in user_settings.json and created the different charts from endpoints.

@deeleeramone deeleeramone added bug Fix bug platform OpenBB Platform labels Sep 9, 2024
@github-actions github-actions bot added v4 PRs for v4 labels Sep 9, 2024
Copy link
Contributor

@piiq piiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we can consider aggregating the styling in one place, but this is out of scope for this PR. Thanks

@piiq piiq added this pull request to the merge queue Sep 10, 2024
Merged via the queue into develop with commit f483a8a Sep 10, 2024
10 checks passed
@deeleeramone
Copy link
Contributor Author

At some point we can consider aggregating the styling in one place, but this is out of scope for this PR. Thanks

That'll be in scope when we deal with replacing frontend-components, which needs to happen at some point.

@IgorWounds IgorWounds deleted the bugfix/api-chart-style branch September 26, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants