I am trying to call ChartBuilder::build_cartesian_2d with Range<chrono::NaiveDateTime> as an argument, but it fails due to unsatisfied AsRangedCoord trait. If I construct RangedDateTime object manually with RangedDateTime::from(min_date..max_date) it works, so I feel this was just an oversight.
To Reproduce
let min_date = NaiveDateTime::UNIX_EPOCH;
let max_date = NaiveDateTime::UNIX_EPOCH.add(TimeDelta::seconds(64));
let mut chart = ChartBuilder::on(&root)
.build_cartesian_2d(min_date..max_date, -0.1f32..1f32)
.unwrap();
// ...
Describe the bug
I am trying to call
ChartBuilder::build_cartesian_2d
withRange<chrono::NaiveDateTime>
as an argument, but it fails due to unsatisfiedAsRangedCoord
trait. If I constructRangedDateTime
object manually withRangedDateTime::from(min_date..max_date)
it works, so I feel this was just an oversight.To Reproduce
Version Information
plotters = "0.3.6"