Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6375843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:40:04+00:00 2026-05-25T01:40:04+00:00

‘value’ in this example is 5, ‘maxValue’ is 39. The value displayed on the

  • 0

‘value’ in this example is 5, ‘maxValue’ is 39. The value displayed on the progress bar (a wijmo progressbar) is 5.07. {0} should tell the progressbar to show a progress value rather than a percentage. If I change the value to 8, maintaining the max value as 39, the value displayed becomes 8.19. I’m a bit confused as to why I am seeing floating point numbers and not integers. I can’t see anything in the progressbar code which would display anything other than self.value() which logs to the console as an integer. So what might be causing this behaviour?

$("#proBarAdherence").wijprogressbar({

  value: Gymloop.completedCount,
  animationOptions: {
    duration: 1000
  },

  maxValue: Gymloop.targetSessions,
  indicatorImage: '/images/progbar_red.png',
  labelAlign: 'running',
  labelFormatString: '{0} sessions completed',
  beforeProgressChanging: function(e,data) {
    console.log('beforeprogresschanging',data);
  },
  progressChanging: function (e,data) {
    console.log('progresschanging',data);

  },
  progressChanged : function (e,data) {
    console.log('progresschanged',data);
  }
});

beforeprogresschanging Object { oldValue="5", newValue=5}
progresschanging Object { oldValue="5", newValue=0}
progresschanging Object { oldValue="0", newValue=1.17}
progresschanging Object { oldValue="1.17", newValue=1.56}
progresschanging Object { oldValue="1.56", newValue=1.95}
progresschanging Object { oldValue="1.95", newValue=2.34}
progresschanging Object { oldValue="2.34", newValue=2.73}
progresschanging Object { oldValue="2.73", newValue=3.12}
progresschanging Object { oldValue="3.12", newValue=3.51}
progresschanging Object { oldValue="3.51", newValue=3.9}
progresschanging Object { oldValue="3.9", newValue=4.29}
progresschanging Object { oldValue="4.29", newValue=4.68}
progresschanging Object { oldValue="4.68", newValue=5.07}
progresschanged Object { oldValue="5", newValue=5}

Update

I can see the value’s during the progressChanging event but am not sure how to make the label display 5 instead of 5.07 once the the animation is complete? There is a live example here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:40:05+00:00Added an answer on May 25, 2026 at 1:40 am

    You need to round if you want to display integers JavaScript uses floats for everything.
    How do I convert a float number to a whole number in JavaScript?

    — Response to the update —
    I am not particularly familiar with that exact progress bar but they are all similar.
    Whats happening is you are calling round once when the variable is initialized and not when the variable is updated.

    There is an event associated with the loading bar being updated that is where you want to round the completed Count before it is passed to the progress bar.

    I am not sure if I am doing a good job explaining whats happening
    value = Math.round(myobj.completedCount), —update event–> completedCount = newValue
    —update event—> completedCount = newValue
    what you need to do is catch that update event and round the variable there.
    —update event–> completedCount = round(newValue)

    —— TRY THIS——-
    The trouble line is this
    percent = (value - self.min) / (self.max - self.min) * 100;
    replace line 328 from the source code of the wijmo bar with
    percent = Math.round((value - self.min) / (self.max - self.min)) * 100;
    and it should act the way you want it to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Hi if i run my project its indicate this logcat error...how to solve this
Does anyone know how can I replace this 2 symbol below from the string
i got an object with contents of html markup in it, for example: string
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I am trying to create a RegEx expression that will successfully parse the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.