Files
OpenBB/openbb_sdk/extensions/charting
Henrique Joaquim 0a521a087e Feature/remove unncessary stuff (#5346)
* removing the journal service from the command_runner

* remove the journal service and fix tests

* removing journal from the command_runner

* removing journal entry references and adding optional metadata

* rebuilding static assets

* removing all references to journal entry

* removing all references to journal and journal repository

* removing journal query references

* restructuring the command runner

* fix argument mismatch and settings to user mismatch

* dropping command runner session

* re generation of static assets

* ruff n black

* removing introduced bug

* removing duplicate reference due to merging

* 3.8 compatible static assets

* changing the way we deal with erros - removing the Error model

* removing unncessary filters

* fixing tests

* regenerating static assets

* remving mongodb references from user service

* remving mongodb references

* updating dependencies with removed pymongo

* updating dependencies with removed pymongo

* removing useless call

* fix typo

* ruff

* fixing tests

* ruff

* removing leftovers

* making registry map 3.8 compatible
2023-08-21 17:46:14 +01:00
..
2023-08-18 14:48:13 +02:00
2023-07-24 16:50:04 +02:00
2023-07-24 17:59:22 +01:00

OpenBB Charting extension

This extension provides a charting library for OpenBB SDK.

The library includes:

  • a charting infrastructure based on Plotly
  • a set of charting components
  • prebuilt charts for a set of commands that are built-in OpenBB SDK extensions

Installation

To install the extension, run the following command in this folder:

pip install .

PyWry dependency on Linux

The PyWry dependency handles display of interactive charts and tables in a separate window. It is installed automatically with the OpenBB Charting extension.

When using Linux distributions, the PyWry dependency requires certain dependencies to be installed first.

  • Debian-based / Ubuntu / Mint: sudo apt install libwebkit2gtk-4.0-dev

  • Arch Linux / Manjaro: sudo pacman -S webkit2gtk

  • Fedora: sudo dnf install gtk3-devel webkit2gtk3-devel

Usage

To use the extension, run any of the OpenBB SDK endpoints with the chart argument set to True.

Here's an example how it would look like in a python interface:

from openbb import obb
stock_data = obb.stocks.load(symbol="TSLA", chart=True)

This results in a OBBject object containing a chart attribute, which contains Plotly JSON data.

In order to display the chart, you need to call the show() method:

stock_data.show()

Note: The show() method currently works either in a Jupyter Notebook or in a standalone python script with a PyWry based backend properly initialized.