Struct plotters::element::CandleStick [−][src]
pub struct CandleStick<X, Y: PartialOrd> { /* fields omitted */ }
Expand description
The candlestick data point element
Implementations
impl<X: Clone, Y: PartialOrd> CandleStick<X, Y>[src]
impl<X: Clone, Y: PartialOrd> CandleStick<X, Y>[src]pub fn new<GS: Into<ShapeStyle>, LS: Into<ShapeStyle>>(
x: X,
open: Y,
high: Y,
low: Y,
close: Y,
gain_style: GS,
loss_style: LS,
width: u32
) -> Self[src]
pub fn new<GS: Into<ShapeStyle>, LS: Into<ShapeStyle>>(
x: X,
open: Y,
high: Y,
low: Y,
close: Y,
gain_style: GS,
loss_style: LS,
width: u32
) -> Self[src]Create a new candlestick element, which requires the Y coordinate can be compared
x: The x coordinateopen: The open valuehigh: The high valuelow: The low valueclose: The close valuegain_style: The style for gainloss_style: The style for losswidth: The width- returns The newly created candlestick element
use chrono::prelude::*; use plotters::prelude::*; let candlestick = CandleStick::new(Local::now(), 130.0600, 131.3700, 128.8300, 129.1500, &GREEN, &RED, 15);
Trait Implementations
impl<X, Y: PartialOrd, DB: DrawingBackend> Drawable<DB, BackendCoordOnly> for CandleStick<X, Y>[src]
impl<X, Y: PartialOrd, DB: DrawingBackend> Drawable<DB, BackendCoordOnly> for CandleStick<X, Y>[src]impl<'a, X: 'a, Y: PartialOrd + 'a> PointCollection<'a, (X, Y), BackendCoordOnly> for &'a CandleStick<X, Y>[src]
impl<'a, X: 'a, Y: PartialOrd + 'a> PointCollection<'a, (X, Y), BackendCoordOnly> for &'a CandleStick<X, Y>[src]Auto Trait Implementations
impl<X, Y> RefUnwindSafe for CandleStick<X, Y> where
X: RefUnwindSafe,
Y: RefUnwindSafe,
X: RefUnwindSafe,
Y: RefUnwindSafe,
impl<X, Y> Send for CandleStick<X, Y> where
X: Send,
Y: Send,
X: Send,
Y: Send,
impl<X, Y> Sync for CandleStick<X, Y> where
X: Sync,
Y: Sync,
X: Sync,
Y: Sync,
impl<X, Y> Unpin for CandleStick<X, Y> where
X: Unpin,
Y: Unpin,
X: Unpin,
Y: Unpin,
impl<X, Y> UnwindSafe for CandleStick<X, Y> where
X: UnwindSafe,
Y: UnwindSafe,
X: UnwindSafe,
Y: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> SetParameter for T
impl<T> SetParameter for Tfn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>, Sets value as a parameter of self.