ayushsharma82 / ESP-DASH

Realtime Dashboard UI Library for ESP32 / ESP8266
https://espdash.pro
GNU General Public License v3.0
923 stars 200 forks source link

Progress card should show the current value #220

Open mathieucarbou opened 1 month ago

mathieucarbou commented 1 month ago

request to change from:

            <span>{ calculateProgress(currentValue, data.min, data.max).toFixed(0) }<span class="font-normal">{ data.symbol }</span></span>

to

            <span>{ currentValue }<span class="font-normal">{ data.symbol }</span></span>

The percentage 0-100 is only linked to the computation of the progress bar. But the value displayed should be in relation with the value sent from the ESP, and also in relation with the min and max set in the card definition.

mathieucarbou commented 1 month ago

I.e. i have a slider 0 - 10000 that I am swapping with a progress bar 0 - 10000:

image

image

The slider shows the correct value after the fix and the % for the progress bar correctly computed.