Skip to content

Commit

Permalink
Fix inverted bearish/bullish colors in the volume pane
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Jun 5, 2022
1 parent cb1e925 commit a3c561d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Fixed a zero division error when min, and max, prices are equals inside a same candle (closes [#4])
- Fixed small numbers display on the Y-axis (closes [#5])
- Fixed bearish/bullish colors inversion in the volume pane

### Removed
-
Expand Down
4 changes: 2 additions & 2 deletions examples/integrate-with-rich.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def make_layout() -> Layout:

def make_chart(candles: Candles, nature: str) -> Chart:
chart = Chart(candles, title=f"Rich candlesticks {nature}!")
chart.set_bear_color(1, 205, 254)
chart.set_bull_color(255, 107, 153)
chart.set_bear_color(255, 107, 153)
chart.set_bull_color(1, 205, 254)
chart.set_label("average", "")
chart.set_label("volume", "")
return chart
Expand Down
4 changes: 2 additions & 2 deletions src/candlestick_chart/volume_pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
class VolumePane:
height: int
enabled: bool = True
bearish_color: Tuple[int, int, int] = (52, 208, 88)
bullish_color: Tuple[int, int, int] = (234, 74, 90)
bearish_color: Tuple[int, int, int] = (234, 74, 90)
bullish_color: Tuple[int, int, int] = (52, 208, 88)
unicode_fill: str = UNICODE_FILL

def _colorize(self, candle_type: int, string: str) -> str:
Expand Down

0 comments on commit a3c561d

Please sign in to comment.