Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
276 stars 81 forks source link

Character missing when decimal point added on chart temperature #26

Closed chrislolk closed 2 years ago

chrislolk commented 5 years ago

When the chart's temperature axis is change to decimal values, the first character is not shown (too large for the display). E.g. with temperature 15.5 degrees, the "1" is not shown.

scstraus commented 5 years ago

I'm having this problem too. The temperatures in the screenshot below are from 9.5-13.5 degrees, but it's showing it as 9.5-3.5..

At first I thought this was from an upgrade, but I downgraded and still have it. I think it has to do with temps starting at under 10 and going to over 10, but being close enough together to justify the decimal. I don't see it often, but I'm guessing this is why I'm seeing it now.

image

brandondb1 commented 4 years ago

I have this too. I think its when the temperature range is small - if the range is large, it only shows whole numbers, but when the range is small it shows 0.5's, which pushes the length of the text out too long and cuts off the tens and the sign (if minus)

brandondb1 commented 4 years ago

After a bit of looking, on line 432, there is: scaleInstance.width = 30; If you set the number higher (35 worked for me with minus teens; -14) it widens the space available for the axis numbers.

chanyork commented 3 years ago

After a bit of looking, on line 432, there is: scaleInstance.width = 30; If you set the number higher (35 worked for me with minus teens; -14) it widens the space available for the axis numbers.

This doesn't work for me. Any other solution for this?

brandondb1 commented 3 years ago

Make sure you refresh / clear your cache. F12, right click on reload button, purge cache.

scstraus commented 3 years ago

Works for me too. Sometimes I have to delete the .gz version of the card in the custom card folder to get it to acknowledge the changes in the .js file.