Skip to content

Commit e739e6b

Browse files
committed
📝 update readme with new api functions
1 parent 9f58cef commit e739e6b

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ fn main() {
6060
// Set customs colors
6161
chart.set_bear_color(1, 205, 254);
6262
chart.set_bull_color(255, 107, 153);
63+
chart.set_vol_bull_color(1, 205, 254);
64+
chart.set_vol_bear_color(255, 107, 153);
6365

66+
chart.set_volume_pane_height(6);
67+
chart.set_volume_pane_enabled(false);
68+
6469
chart.draw();
6570
}
6671
```

examples/fetch-from-binance.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct BinanceKlinesItem {
2121

2222
fn main() -> Result<(), Box<dyn Error>> {
2323
let candles =
24-
reqwest::blocking::get("https://api.binance.com/api/v1/klines?symbol=BTCUSDT&interval=1h")?
24+
reqwest::blocking::get("https://api.binance.com/api/v1/klines?symbol=CHZUSDT&interval=1h")?
2525
.json::<Vec<BinanceKlinesItem>>()?
2626
.iter()
2727
.map(|candle| {
@@ -38,13 +38,13 @@ fn main() -> Result<(), Box<dyn Error>> {
3838

3939
let mut chart = Chart::new(&candles);
4040

41-
chart.set_name(String::from("BTC/USDT"));
41+
chart.set_name(String::from("CHZ/USDT"));
4242
chart.set_bull_color(1, 205, 254);
4343
chart.set_bear_color(255, 107, 153);
4444
chart.set_vol_bull_color(1, 205, 254);
4545
chart.set_vol_bear_color(255, 107, 153);
46-
chart.set_volume_pane_height(15);
47-
chart.set_volume_pane_enabled(false);
46+
chart.set_volume_pane_height(4);
47+
chart.set_volume_pane_enabled(true);
4848
// chart.set_volume_pane_unicode_fill(true);
4949

5050
chart.draw();

0 commit comments

Comments
 (0)