Giter Site home page Giter Site logo

Comments (12)

slavkobrzeg avatar slavkobrzeg commented on May 22, 2024 1

I also noticed very weird behaviour, but in my opinion
points_per_hour: 2 hours_to_show: 6
produces correct graph in terms of its length - 6 hours, and number of points - in this case 12, but what is wrong is actually the labels about each point. Even if the time frame it shows covers 30 minutes each and every point starts with an hour difference between other neighboring points.

tempgraph1
tempgraph2
{That 3 minutes difference is because I took second pictures 3 minutes later}

So the last point should say something about 4 AM not 11 PM previous day.
tempgraph3

So in my opinion the graph is correct, because it shows lines correctly, only the labels are not.

from mini-graph-card.

slavkobrzeg avatar slavkobrzeg commented on May 22, 2024 1

I am definitely sure that the graph itself is fine. i compared it with my original temp graphs I have from the native thermostat app.

from mini-graph-card.

arigit avatar arigit commented on May 22, 2024 1

@kalkih : I can confirm what @slavkobrzeg mentioned - the graphs look right, just the timestamp calculations are off.
Thanks a zillion for the quick response on this!

from mini-graph-card.

slavkobrzeg avatar slavkobrzeg commented on May 22, 2024 1

I works perfectly!

from mini-graph-card.

arigit avatar arigit commented on May 22, 2024 1

Tested - all issues fixed and it looks really great
What an outstanding addition to HA. Thanks @kalkih for this

from mini-graph-card.

kalkih avatar kalkih commented on May 22, 2024

As @slavkobrzeg and #37 says, the timestamp is definitely not calculated correctly when using the points_per_hour option.
Although I believe that the actual graph is correct, at least from my testing, as long as hours_to_show is an integer the graph will render the correct history.

Would be great if you could confirm this by maybe creating a history-graph card just below the mini-graph-card and set the same hours_to_show in the config and compare the results.

from mini-graph-card.

kalkih avatar kalkih commented on May 22, 2024

There is also a problem with the labels (too much to the left and also too tiny after reducing font_size to 60) but I think there is a merged patch that would fix that in master already

The labels are getting changed in the next version, however they still scale with the set font_size, will see if I possibly can add a min size for them, where they won't scale below, thanks!

from mini-graph-card.

kalkih avatar kalkih commented on May 22, 2024

@arigit Also added a min size to the labels font size which it won't scale below cd6d880

from mini-graph-card.

arigit avatar arigit commented on May 22, 2024

It seems there is a fix committed to master for this already! Willing to test - but I couldn't find a test .js 'bundle' to replace the one I have installed on my raspbian-based HA install.

I have "custom-updater' installed as well and refreshing it ever now and then - it is not yet seeing the new version. @kalkih would it be possible to post a 'js bundle' somewhere that includes the latest commits so we can give it shot and confirm

from mini-graph-card.

kalkih avatar kalkih commented on May 22, 2024

@arigit
It's in the dev branch and will be in the next release.
I usually don't do pre releases but sure, why not 🙂
https://github.com/kalkih/mini-graph-card/releases/tag/0.2.2-beta

Make sure to clear cache or bump the version number in the resource reference to make sure the new version loads properly.

from mini-graph-card.

kalkih avatar kalkih commented on May 22, 2024

Found another issue with the reported timestamps, this time when only part of set hours_to_show was available in history, should be resolved with 2dc35b7 by rendering missing history in a straight horizontal line up to the point where history is available.

hyperion_8123_lovelace_4 21

from mini-graph-card.

kalkih avatar kalkih commented on May 22, 2024

Fixed in latest v0.2.2

from mini-graph-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.