tktax-histogram 0.2.2

A Rust crate that provides robust monthly histogram utilities for financial transactions, using specialized types from the TKTAX ecosystem.
Documentation
// ---------------- [ File: tktax-histogram/src/create_account_histogram.rs ]
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)
    }
}