kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.96k stars 232 forks source link

fix: add first datapoint tooltip for line graph #882

Closed akloeckner closed 1 year ago

akloeckner commented 1 year ago

Already the first commit 7e15867ed657cbd0a3b64a3a0a5d47c7f69ffb91 introducing tooltips did not render the first data point as tooltip-able. While there certainly was a reason for it, I cannot figure it out. Additionally, there is no such logic for bar tooltips (getBars) nor in the actual line graph (getLine). So, I propose to include the first point in the tooltips.

Fixes #879, #878

akloeckner commented 1 year ago

Beware of #878. When trying to fix that, too, now, I realized they're linked somehow. Tooltip dates are off a day, now. I'll investigate and amend...

akloeckner commented 1 year ago

Done. This might have fixed #878, too. Will need to check later...

akloeckner commented 1 year ago

The smoothed graphs required some of the logic I had removed in my first commit. So, now cleaned up the change, such that the (somewhat involved) logic for smoothing is in a separate code block. This still fixes also #878.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 0.12.0-dev.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] commented 7 months ago

:tada: This PR is included in version 0.12.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: