• Resolved fredericp2719

    (@fredericp2719)


    Hi,
    First of all, thank you for this great plugin !
    I use this plugin (v4.2.3) successfully with integer numbers.
    I activated 2 options, “Use number inside shortcode” and “Use Grouping?”.
    The decimal symbol configured is “,”
    I have many figures on the same page, 2 integers and 1 float value. For the float value, nothing appears or “NaN”.
    This is what I used :
    [countup start=”0″ duration=”1″ decimals=”2″]6.15[/countup]

    Is there a mistake in my shortcode ?

    Thank you,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Roel Magdaleno

    (@rokumetal)

    Hi @fredericp2719

    I tested your shortcode and renders perfect in my local environment. I typed it manually in WP editor so if you copied the shortcode can you type the shortcode manually instead?

    Here are the shortcodes I tested:

    
    [countup start="0" duration="1"]50[/countup]
    [countup start="0" duration="1" decimals="2"]100[/countup]
    [countup start="0" duration="1" decimals="2"]6.15[/countup]
    

    I was able to replicate your issue but I used 6,15 instead of 6.15. With a comma inside the number, the issue you have appears. So, can you try the shortcode in a separated page with the shortcodes I inserted? Thanks.

    Here are the settings I tested, looks like are the same as yours?

    View post on imgur.com

    Also you can try a demo (not WP version) to know the settings:
    https://inorganik.github.io/countUp.js/

    Thread Starter fredericp2719

    (@fredericp2719)

    Hi @rokumetal
    Thank you for your prompt reply and your goood work !
    I have pretty much the same options, except the thousand separator which is “space” for me.
    I didn’t find where was my mistake but it works fine now.

    Plugin Author Roel Magdaleno

    (@rokumetal)

    Glad it works now! Maybe was due to double quote, sometimes double quotes messes with the HTML output.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with decimal numbers’ is closed to new replies.