kalkih / mini-graph-card

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

First point not rendered as mouse-over-able #879

Closed akloeckner closed 7 months ago

akloeckner commented 1 year ago

When we render a graph, the line is drawn for all coordinates (or, data points). But the first coordinate is not drawn as a point, i.e. the user cannot hover over the point and read its value.

Example following. Notice the missing small circle for the left-most data point. There should be 3 points. But only 2 are rendered. image

Corresponding configuration:

type: custom:mini-graph-card
entities:
  - entity: sensor.haushalt_gasverbrauch
hours_to_show: 3
points_per_hour: 1
aggregate_func: mean
hour24: true
decimals: 2
smoothing: false
show:
  graph: line
  labels: false
  state: false

Judging from the following code line, it seems this first point is removed on purpose. Is that correct? If so: Why is that? If not: Should it be fixed? https://github.com/kalkih/mini-graph-card/blob/8e70381e3d887e5803bc8fc4bc115ecc4dc587e0/src/graph.js#L123

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 0.12.0-dev.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

ildar170975 commented 7 months ago

@akloeckner The issue is associated with a PR which was merged. Shall we close the issue? Or this merged code is still in dev?

akloeckner commented 7 months ago

The merged code is still in dev. We have never merged dev into master. I think we should do that at the next occasion. The code is stable for multiple months now...

ildar170975 commented 7 months ago

Then let's keep the issue open...

github-actions[bot] commented 7 months ago

:tada: This issue has been resolved in version 0.12.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

ildar170975 commented 7 months ago

@akloeckner Seems to be fixed: the 1st point is shown as a "point":

image

type: custom:mini-graph-card
entities:
  - entity: sensor.xiaomi_cg_1_co2
hours_to_show: 3
points_per_hour: 1
aggregate_func: mean
hour24: true
decimals: 2
smoothing: false
show:
  graph: line
  points: true
  labels: false
  state: true

Shall we close?

akloeckner commented 7 months ago

Yes! I thought, the issue would have been closed automatically....