WPIntell

Source evidence

Problem with decimal numbers

WP CountUP JS · support · 2021-09-04T09:42:00+00:00

mixedsentiment
mediumseverity
0.84relevance
3replies
Evidence onlycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 1 rows with source links

100.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

0 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
fredericp2719 resolved
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, 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/ 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. Glad it works now! Maybe was due to double quote, sometimes double quotes messes with the HTML output. Thanks.

Comments

3 shown
Roel Magdaleno 2021-09-04T17:10:00+00:00

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/

fredericp2719 2021-09-04T18:00:00+00:00

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.

Roel Magdaleno 2021-09-04T18:39:00+00:00

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