Skip to content

Finance fixes #270

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

Merged
merged 9 commits into from
Jul 29, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nicer default reds and greens
  • Loading branch information
chriddyp committed Jul 29, 2015
commit c3c8672f914d0f7bece11d7c012c6a4b04d0aff8
8 changes: 6 additions & 2 deletions plotly/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,10 @@ def sum_streamlines(self):
return streamline_x, streamline_y


_DEFAULT_INCREASING_COLOR = '#3D9970' # http://clrs.cc
_DEFAULT_DECREASING_COLOR = '#FF4136'


class FigureFactory(object):
"""
BETA functions to create specific chart types.
Expand Down Expand Up @@ -2183,7 +2187,7 @@ def _make_increasing_ohlc(open, high, low, close, dates, **kwargs):
kwargs.setdefault('name', 'Increasing')
showlegend = False

kwargs.setdefault('line', dict(color='rgb(44, 160, 44)'))
kwargs.setdefault('line', dict(color=_DEFAULT_INCREASING_COLOR))
kwargs.setdefault('text', text_increase)

ohlc_incr = dict(type='scatter',
Expand Down Expand Up @@ -2214,7 +2218,7 @@ def _make_decreasing_ohlc(open, high, low, close, dates, **kwargs):
flat_decrease_y,
text_decrease) = _OHLC(open, high, low, close, dates).get_decrease()

kwargs.setdefault('line', dict(color='rgb(214, 39, 40)'))
kwargs.setdefault('line', dict(color=_DEFAULT_DECREASING_COLOR))
kwargs.setdefault('text', text_decrease)
kwargs.setdefault('showlegend', False)
kwargs.setdefault('name', 'Decreasing')
Expand Down