crate::ix!();
pub trait CreateAccountHistogram {
fn histogram(&self, strategy: &HistogramDisplayStrategy) -> AccountHistogram;
}
impl CreateAccountHistogram for Account {
fn histogram(&self, strategy: &HistogramDisplayStrategy) -> AccountHistogram {
let bins = convert_vec_f64_to_vec_decimal(
&vec![
-10000.0,
-2000.0,
-1000.0,
-500.0,
-200.0,
-100.0,
-60.0,
-20.0,
0.0,
20.0,
60.0,
100.0,
200.0,
500.0,
1000.0,
2000.0,
10000.0
]
);
AccountHistogramBuilder::new(self, bins).build_histogram(strategy)
}
}