We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm trying to migrate from the old script to this one (using bundle.js) but the meter is not updating.
In my HTML I have created the DIV. <div id="water_level0" class="meter-container"></div>
<div id="water_level0" class="meter-container"></div>
Then in a JS I created the fluid meter. const water_level0 = document.querySelector("#water_level0"); new cfmModule.CircularFluidMeter(water_level0, { borderWidth: 20, initialProgress: 0, maxProgress: 100, backgroundColor: '#e2e2e2', borderColor: '#f8f9fa', bubbleColor: '#6bcfff', dropShadow: false, use3D: true, fontSize: 50, progressFormatter: (value) => { return ${value.toFixed(0)}%; }, fluidConfiguration: { color: '#16e1ff' } });
${value.toFixed(0)}%
And finaly I update the progress value reading a JSON, but it's not working, the meter stays to zero. water_level0.progress = myJSON.water_level0;
water_level0.progress = myJSON.water_level0;
With the old script I used this and it was working. water_level0.setPercentage(myJSON.water_level0);
water_level0.setPercentage(myJSON.water_level0);
What am I doing wrong?
Many thanks for your support
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm trying to migrate from the old script to this one (using bundle.js) but the meter is not updating.
In my HTML I have created the DIV.
<div id="water_level0" class="meter-container"></div>
Then in a JS I created the fluid meter.
const water_level0 = document.querySelector("#water_level0");
new cfmModule.CircularFluidMeter(water_level0, {
borderWidth: 20,
initialProgress: 0,
maxProgress: 100,
backgroundColor: '#e2e2e2',
borderColor: '#f8f9fa',
bubbleColor: '#6bcfff',
dropShadow: false,
use3D: true,
fontSize: 50,
progressFormatter: (value) => {
return
${value.toFixed(0)}%
;},
fluidConfiguration: {
color: '#16e1ff'
}
});
And finaly I update the progress value reading a JSON, but it's not working, the meter stays to zero.
water_level0.progress = myJSON.water_level0;
With the old script I used this and it was working.
water_level0.setPercentage(myJSON.water_level0);
What am I doing wrong?
Many thanks for your support
The text was updated successfully, but these errors were encountered: