Skip to main content

egui_charts/data/
targets.rs

1//! Analyst estimates supplied by the host's data provider.
2
3use chrono::NaiveDate;
4
5/// Consensus price targets for one symbol, in its price units. The chart accepts finite prices
6/// with `low <= average <= high`, a nonzero analyst count and a horizon after publication.
7#[derive(Clone, Debug, PartialEq)]
8pub struct PriceTargets {
9    /// Highest estimate.
10    pub high: f64,
11    /// Average estimate.
12    pub average: f64,
13    /// Lowest estimate.
14    pub low: f64,
15    /// Analysts represented by these estimates.
16    pub analysts: u32,
17    /// Publication date of this consensus.
18    pub published: NaiveDate,
19    /// Date the estimates refer to, on the chart's UTC daily time axis.
20    pub horizon: NaiveDate,
21}