How to display Infinity for users

I am developing an interface that displays a table for users with marketing expenses and conversions in marketing expenses.

The table looks something like this:

<table>
  <tr>
    <th>Spend</th>
    <th>Conversions</th>
    <th>Cost per Conversion</th>
  </tr>
  <tr>
    <td>$45.92</td>
    <td>231</td>
    <td>$0.20</td>
  </tr>
  <tr>
    <td>$22.12</td>
    <td>0</td>
    <td>{{?}}</td>
  </tr>
</table>

The table is populated with JavaScript, which dynamically calculates the conversion rate.

When JS starts in the third line, I get the line "Infinity" displaying for the conversion speed due to division by zero, which happens ( 22.12/0)

What is interesting to me, from the point of view of the user, what should I show there? These are users, not mathematicians, so using the Infinity symbol will confuse them, and using 0 will display incorrect data.

+4
3

- , , , , :

n/a

, , . , , . $0.20 20%.

- , ( ), , . .

+5

"", - , (22.12/0)

, , ?

, , , .

" " , , , ( ).

, , , :

$ 12,34   0   βˆžβ‚
  • , .
+1

, " "? (NaN ).

0

Source: https://habr.com/ru/post/1539331/


All Articles