Skip to content

Conversation

@komi1230
Copy link
Contributor

When we use datetime type for x-axis and the data is in the same week, this crate crashes with saying panicked at 'attempt to divide by zero'.

This is caused by the calculation of the number of points in a week.
When all data is in a week, num_weeks() method returns 0 and results in panic.

close #190

@AaronErhardt
Copy link
Member

Thanks!

@AaronErhardt AaronErhardt merged commit 86fbadb into plotters-rs:master Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zero division panic with datetime axis and short span of data

2 participants