pub struct CandleStick<X, Y>where
Y: PartialOrd<Y>,{ /* private fields */ }Expand description
The candlestick data point element
Implementations§
source§impl<X, Y> CandleStick<X, Y>where
X: Clone,
Y: PartialOrd<Y>,
impl<X, Y> CandleStick<X, Y>where X: Clone, Y: PartialOrd<Y>,
sourcepub fn new<GS, LS>(
x: X,
open: Y,
high: Y,
low: Y,
close: Y,
gain_style: GS,
loss_style: LS,
width: u32
) -> CandleStick<X, Y>where
GS: Into<ShapeStyle>,
LS: Into<ShapeStyle>,
pub fn new<GS, LS>( x: X, open: Y, high: Y, low: Y, close: Y, gain_style: GS, loss_style: LS, width: u32 ) -> CandleStick<X, Y>where GS: Into<ShapeStyle>, LS: Into<ShapeStyle>,
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§
source§impl<X, Y, DB> Drawable<DB, BackendCoordOnly> for CandleStick<X, Y>where
Y: PartialOrd<Y>,
DB: DrawingBackend,
impl<X, Y, DB> Drawable<DB, BackendCoordOnly> for CandleStick<X, Y>where Y: PartialOrd<Y>, DB: DrawingBackend,
source§impl<'a, X, Y> PointCollection<'a, (X, Y), BackendCoordOnly> for &'a CandleStick<X, Y>where
X: 'a,
Y: PartialOrd<Y> + 'a,
impl<'a, X, Y> PointCollection<'a, (X, Y), BackendCoordOnly> for &'a CandleStick<X, Y>where X: 'a, Y: PartialOrd<Y> + 'a,
Auto Trait Implementations§
impl<X, Y> RefUnwindSafe for CandleStick<X, Y>where X: RefUnwindSafe, Y: RefUnwindSafe,
impl<X, Y> Send for CandleStick<X, Y>where X: Send, Y: Send,
impl<X, Y> Sync for CandleStick<X, Y>where X: Sync, Y: Sync,
impl<X, Y> Unpin for CandleStick<X, Y>where X: Unpin, Y: Unpin,
impl<X, Y> UnwindSafe for CandleStick<X, Y>where X: UnwindSafe, Y: UnwindSafe,
Blanket Implementations§
source§impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB, BackendCoordOnly> + 'b,
&'a T: for<'a> PointCollection<'a, Coord, BackendCoordOnly>,
Coord: Clone,
DB: DrawingBackend,
impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere T: Drawable<DB, BackendCoordOnly> + 'b, &'a T: for<'a> PointCollection<'a, Coord, BackendCoordOnly>, Coord: Clone, DB: DrawingBackend,
source§fn into_dyn(self) -> DynElement<'b, DB, Coord>
fn into_dyn(self) -> DynElement<'b, DB, Coord>
Make the conversion