pub struct CandleStick<X, Y>where
    Y: PartialOrd<Y>,
{ /* private fields */ }
Expand description

The candlestick data point element

Implementations

Create a new candlestick element, which requires the Y coordinate can be compared

  • x: The x coordinate
  • open: The open value
  • high: The high value
  • low: The low value
  • close: The close value
  • gain_style: The style for gain
  • loss_style: The style for loss
  • width: 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

Actually draws the element. The key points is already translated into the image coordinate and can be used by DC directly Read more
The item in point iterator
The point iterator
framework to do the coordinate mapping

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Make the conversion
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.