How to use the numeral function in numeral

To help you get started, we’ve selected a few numeral examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pioneers / PieCentral / dawn / renderer / components / peripherals / Motor.js View on Github external
_.map(param, obj => ( // TODO: Figure out if a ProgressBar is useful
        <div>
          <h4 style="{{">
            {`${obj.param}: ${numeral(obj.float_value).format('+0.00')}`}

          </h4>
          
        </div>
      ))
    }
github noobaa / noobaa-core / frontend / src / app / components / host / host-details-form / host-details-form.js View on Github external
function _getTooltipByUsage(subject, used, usedByNoobaa, usedByOther) {
    const usageLevel = used > errorLevel ?
        'Very High' :
        (used > warningLevel) ? 'High' : '';

    return {
        template: 'listWithCaption',
        text: {
            title: `${usageLevel} ${subject} Pressure`.trim(),
            list: [
                `NooBaa utilization: ${numeral(usedByNoobaa).format('%')}`,
                `Server local utilization: ${numeral(usedByOther).format('%')}`
            ]
        },
        position: 'after'
    };
}
github noobaa / noobaa-core / frontend / src / app / components / cloud-resource / cloud-resource-summary / cloud-resource-summary.js View on Github external
dataReady: false
            });

        } else {
            const { io } = resource;
            const { tooltip, ...icon } = getCloudResourceStateIcon(resource);

            ko.assignToProps(this, {
                dataReady: true,
                state: {
                    icon:icon,
                    text: tooltip
                },
                service: _getServiceDisplayName(resource),
                targetBucket: resource.target,
                readCount: numeral(io.readCount).format(','),
                writeCount: numeral(io.writeCount).format(','),
                readSize: {
                    color: theme.color6,
                    value: io.readSize
                },
                writeSize: {
                    color: theme.color28,
                    value: io.writeSize
                }
            });
        }
    }
}
github mozilla-frontend-infra / firefox-health-dashboard / src / quantum / metrics.js View on Github external
{$title}
        {' '}
        {label}
      );
    } else {
      $content.push(<div>{$title}</div>);
    }
    if (evolution) {
      if (typeof evolution === 'object') {
        $content.push(<div>
          <div>
            <span>{numeral(evolution.p50).format(format)}</span>
            <em>p50</em>
          </div>
          <div>
            <span>{numeral(evolution.p95).format(format)}</span>
            <em>p95</em>
          </div>
        </div>);
      }
    } else {
      cls.push('status-wip');
      $content.push(<span>{status || '…'}</span>);
    }
    return (
      <div title="{metric}">
        {$content}
      </div>
    );
  }
github docker / kitematic / src / components / ImageCard.react.js View on Github external
<div>
          <div>
            <span></span><span>SELECTED TAG: <span>{this.state.chosenTag}</span></span>
          </div>
          <div>
            <span disabled="{this.props.image.inUse"><span></span>Delete Tag</span>
          </div>
          {this.props.image.inUse ? <p>To delete, remove all containers<br>using the above image</p> : null }
          <div>
            <a><span></span></a>
          </div>
        </div>
      );
    } else {
      let favCount = (this.props.image.star_count &lt; 1000) ? numeral(this.props.image.star_count).value() : numeral(this.props.image.star_count).format('0.0a').toUpperCase();
      let pullCount = (this.props.image.pull_count &lt; 1000) ? numeral(this.props.image.pull_count).value() : numeral(this.props.image.pull_count).format('0a').toUpperCase();
      create = (
        <div>
          <div>
            <span></span>
            <span>{favCount}</span>
            <span></span>
            <span>{pullCount}</span>
          </div>
          <div>
            <span></span>
          </div>
          <div>
            CREATE
          </div>
        </div>
      );
github Jackyzm / react-app-ts / src / routes / Dashboard / Analysis.tsx View on Github external
日环比<span>11%</span>
                            
                        
                    
                    
                        
                                    
                                
                            }
                            total={numeral(8846).format("0,0")}
                            footer={
                                
                            }
                            contentHeight={46}
                        &gt;
github Vizzuality / gfw / app / javascript / pages / country / widget / widgets / widget-tree-loss / widget-tree-loss-tooltip-component.js View on Github external
render() {
    const { data, extent } = this.props;

    return data &amp;&amp; data.length &gt; 0 ? (
      <ul>
        <li>Year: {data[0].payload.year}</li>
        <li>ha loss: {numeral(data[0].payload.area).format('0,0')} ha</li>
        <li>
          % loss:{' '}
          {numeral(data[0].payload.area / (extent * 100)).format('0.00')}%
        </li>
      </ul>
    ) : null;
  }
}
github steemiz / steemiz / src / features / User / ProfileWallet.js View on Github external
<div>
              <h3></h3>
              <span>Steem</span>
            </div>
          
          <div>
            <div>
              <h3>STEEM DOLLARS</h3>
              <p>
                Tokens worth about $1.00 of STEEM, currently collecting 0% APR.
              </p>
            </div>
            <div>
              <h3>
                <span>$</span>
                {numeral(currentAccount.sbd_balance).format('0,0.00')}
                </h3>
            </div>
          </div>
          <div>
            <div>
              <h3>SAVINGS</h3>
              <p>
                Balance subject to 3 day withdraw waiting period, STEEM DOLLARS currently collecting 0% APR.
              </p>
            </div>
            <div>
              <h3>{numeral(savingBalance).format('0,0.00')}</h3>
              <span>steem</span>
              <h3>
                <span>$</span>
                {numeral(savingSbdBalance).format('0,0.00')}</h3></div></div>
github PatMurrayDEV / apple-music-history / src / components / Results.jsx View on Github external
<br><br><a href="http://music.patmurray.co">Reload Page...</a>)
        }


        let artistTotalCount = (this.state.artists.length &gt; 8 ? 8 : this.state.artists.length);
        var artistBoxes = [];
        for (let index = 0; index &lt; artistTotalCount; index++) {
            const artist = this.state.artists[index];
            const div = <div>
                <div>
                    <p style="{{">Most played artist {index + 1}</p>
                    <h1>{artist.key}</h1>
                </div>
                <div>
                    <hr>
                    <p>{numeral(artist.value.plays).format('0,0')} Plays</p>
                    <p>{Computation.convertTime(artist.value.time)}</p>
                </div>
            </div>
            artistBoxes.push(div);
        }



        var topSong = this.state.filteredSongs[0];


        var topSongBox = ;

        var heatmapData = [];
        var firstDay = new Date();
        var maxValue = 0;