Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] AsRangedCoord not implemented for Range<NaiveDateTime> #605

Open
DCNick3 opened this issue Jun 30, 2024 · 0 comments
Open

[BUG] AsRangedCoord not implemented for Range<NaiveDateTime> #605

DCNick3 opened this issue Jun 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@DCNick3
Copy link

DCNick3 commented Jun 30, 2024

Describe the bug

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();

// ...

Version Information
plotters = "0.3.6"

@DCNick3 DCNick3 added the bug Something isn't working label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant