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

/portfolio/po : allow getting plotly figure with the SDK #4449

Merged

Conversation

Chavithra
Copy link
Contributor

Description

Updating the menu /portfolio/po to return a plotly.graph_objs._figure.Figure instead of a of displaying a matplotlib chart.

The plotly.graph_objs._figure.Figure is just an image of the matplotlib chart.

Example:

from openbb_terminal.sdk import openbb
d = {
            "SECTOR": {
                "AAPL": "INFORMATION TECHNOLOGY",
                "MSFT": "INFORMATION TECHNOLOGY",
                "AMZN": "CONSUMER DISCRETIONARY",
            },
            "CURRENT_INVESTED_AMOUNT": {
                "AAPL": "100000.0",
                "MSFT": "200000.0",
                "AMZN": "300000.0",
            },
            "CURRENCY": {
                "AAPL": "USD",
                "MSFT": "USD",
                "AMZN": "USD",
            },
        }
p = openbb.portfolio.po.load(symbols_categories=d)
fig = openbb.portfolio.po.ef_chart(portfolio_engine=p, external_axes=True)
fig.show()

@Chavithra Chavithra requested a review from montezdesousa March 10, 2023 01:46
@reviewpad reviewpad bot added the feat S Small T-Shirt size Feature label Mar 10, 2023
@Chavithra Chavithra changed the title Allow turning charts into fig on SDK /portfolio/po : allow turning charts into fig on SDK Mar 10, 2023
@Chavithra Chavithra changed the title /portfolio/po : allow turning charts into fig on SDK /portfolio/po : allow getting plotly figure in SDK Mar 10, 2023
@Chavithra Chavithra changed the title /portfolio/po : allow getting plotly figure in SDK /portfolio/po : allow getting plotly figure with the SDK Mar 10, 2023
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@6a26d4e). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4449   +/-   ##
==========================================
  Coverage           ?   54.74%           
==========================================
  Files              ?      596           
  Lines              ?    53615           
  Branches           ?        0           
==========================================
  Hits               ?    29349           
  Misses             ?    24266           
  Partials           ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Chavithra Chavithra enabled auto-merge March 10, 2023 11:39
@Chavithra Chavithra added this pull request to the merge queue Mar 10, 2023
Merged via the queue into OpenBB-finance:develop with commit aac18a7 Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat S Small T-Shirt size Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants