OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

Display daily returns as bar chart with color=red for negative return…

Open LarsKarbach opened this issue 3 years ago • 2 comments

…s and color=green for positive return

Description

The displayed daily return as given by the dret_chart command is implemented as a connected line chart. I think a bar chart is more visually appealing. I've gone further and added red/green color for returns below/above zero. See example:

Before: Daily_return_old

After: daily_return_new

LarsKarbach avatar Jan 01 '23 16:01 LarsKarbach

This definitely looks a lot nicer!

One question, instead of using red/green, can we use the custom theme files?

They are:

from openbb_terminal.config_terminal import theme

Then it is theme.up_color or theme.down_color instead of red/green

jmaslek avatar Jan 01 '23 20:01 jmaslek

Of course, fixed it.

LarsKarbach avatar Jan 02 '23 07:01 LarsKarbach

Nice! The linter is now yelling. Running black ./ should fix the file and make it happy.

jmaslek avatar Jan 03 '23 14:01 jmaslek