File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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```
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ struct BinanceKlinesItem {
2121
2222fn 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 ( ) ;
You can’t perform that action at this time.
0 commit comments