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

Fixed incorrect value for the first point #327

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

maxwroc
Copy link
Contributor

@maxwroc maxwroc commented Apr 9, 2020

Hello again @kalkih,

I have noticed one issue. You were not resetting seconds and milliseconds when the endTime was set. This was resulting in slightly wrong value buckets.

This wouldn't be a big deal alone but you have this condition:
if (coords[0] && coords[0].length) coords[0] = [coords[0][coords[0].length - 1]];

For me it looks little bit hacky way of solving some specific scenario. :) IMO we should think about changing this as it works for me only because I care about max value which is always at the end of the bucket. If someone would like to take min or avg this won't work.

Example case which was failing for me:
image

And the result:
image

Take care buddy. I'm impressed how committed you are for these mini-* cards (I see update after update hehe). I use both of them! Thanks for your hard work!

Max

@maxwroc
Copy link
Contributor Author

maxwroc commented Apr 9, 2020

It fixes #289

@kalkih kalkih linked an issue Apr 13, 2020 that may be closed by this pull request
@kalkih
Copy link
Owner

kalkih commented Apr 13, 2020

Great spotted @maxwroc.
Thanks for the PR, possibly fixes #326 as well?

This wouldn't be a big deal alone but you have this condition:
if (coords[0] && coords[0].length) coords[0] = [coords[0][coords[0].length - 1]];

Indeed that solution is a little hacky and shouid be addressed 😆

Thanks Max!

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.

Wrong last bar value - always zero.
2 participants