pub struct CandlestickChart { /* private fields */ }Expand description
Candlestick / OHLC chart with optional volume panel and overlays.
Implementations§
Source§impl CandlestickChart
impl CandlestickChart
Sourcepub fn style(self, v: CandleStyle) -> Self
pub fn style(self, v: CandleStyle) -> Self
Bar style.
Sourcepub fn hollow(self, v: bool) -> Self
pub fn hollow(self, v: bool) -> Self
Draw bullish candle bodies hollow (outlined) and bearish ones filled.
Sourcepub fn base_style(self, style: Style) -> Self
pub fn base_style(self, style: Style) -> Self
Base style painted over the whole area (beats the theme).
Sourcepub fn candle_width(self, w: u16) -> Self
pub fn candle_width(self, w: u16) -> Self
Body width in cells (ignored for OHLC bars; min 1).
Sourcepub fn show_volume(self, v: bool) -> Self
pub fn show_volume(self, v: bool) -> Self
Show a volume histogram under the price panel.
Sourcepub fn last_price_line(self, v: bool) -> Self
pub fn last_price_line(self, v: bool) -> Self
Dashed horizontal line at the last visible close.
Sourcepub fn band(self, band: BandOverlay) -> Self
pub fn band(self, band: BandOverlay) -> Self
Add a shaded band (e.g. Bollinger) behind the candles.
Sourcepub fn pane(self, pane: IndicatorPane) -> Self
pub fn pane(self, pane: IndicatorPane) -> Self
Add an indicator sub-pane below price/volume (dropped if there is no room).
Sourcepub fn marker(self, marker: TradeMarker) -> Self
pub fn marker(self, marker: TradeMarker) -> Self
Add a buy/sell marker.
Sourcepub fn resistance(self, price: f64) -> Self
pub fn resistance(self, price: f64) -> Self
Resistance level (red dashed line labelled “R”).
Sourcepub fn volume_profile(self, v: bool) -> Self
pub fn volume_profile(self, v: bool) -> Self
Horizontal volume-by-price histogram along the right of the price panel.
Sourcepub fn x_axis(self, axis: Axis) -> Self
pub fn x_axis(self, axis: Axis) -> Self
X axis (title / label style; labels come from Candle::label).
Trait Implementations§
Source§impl Clone for CandlestickChart
impl Clone for CandlestickChart
Source§impl Debug for CandlestickChart
impl Debug for CandlestickChart
Source§impl Widget for &CandlestickChart
impl Widget for &CandlestickChart
Auto Trait Implementations§
impl !RefUnwindSafe for CandlestickChart
impl !UnwindSafe for CandlestickChart
impl Freeze for CandlestickChart
impl Send for CandlestickChart
impl Sync for CandlestickChart
impl Unpin for CandlestickChart
impl UnsafeUnpin for CandlestickChart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more