• /
  • Log in
  • Free account

MetricTableRowCell

Renders a row table cell showing a particular metric. The metric is formatted according to the unit passed. Units are 1:1 compatible with the ones supported by <NrqlQuery> format type CHART.

Unit and prefix formatting is automatically picked for you so that it is consistent with the rest of the platform. Metrics are automatically aligned to the left, and ellipsified from the right, which is the standard way for presenting them.

Usage

import { MetricTableRowCell } from 'nr1'

Examples

Example 1

Props

classNamestring

Appends class names to the component.

Should be used only for positioning and spacing purposes.

onClickfunction

Callback fired any time the user clicks on the table cell.

function (
event: Event
) => undefined
styleobject

Inline style for custom styling.

Should be used only for positioning and spacing purposes.

testIdstring

Adds a data-test-id.

Used to target the component in unit and e2e testing.

toshape|string

Location object or url string to link to.

shape

pathnamerequiredstring
searchstring
hashstring
typeenum
DEFAULT
MetricTableRowCell.TYPE.UNKNOWN

Unit of the provided metric. Will be used for auto-formatting the numerical value.

<One of
MetricTableRowCell.TYPE.APDEX,
MetricTableRowCell.TYPE.BITS,
MetricTableRowCell.TYPE.BITS_PER_MS,
MetricTableRowCell.TYPE.BITS_PER_SECOND,
MetricTableRowCell.TYPE.BYTES,
MetricTableRowCell.TYPE.BYTES_PER_MS,
MetricTableRowCell.TYPE.BYTES_PER_SECOND,
MetricTableRowCell.TYPE.COUNT,
MetricTableRowCell.TYPE.HERTZ,
MetricTableRowCell.TYPE.MS,
MetricTableRowCell.TYPE.PAGES_PER_SECOND,
MetricTableRowCell.TYPE.PERCENTAGE,
MetricTableRowCell.TYPE.REQUESTS_PER_SECOND,
MetricTableRowCell.TYPE.SECONDS,
MetricTableRowCell.TYPE.TIMESTAMP,
MetricTableRowCell.TYPE.UNKNOWN,
>
valuerequirednumber

Metric value, always in the shape of a number.

Methods

MetricTableRowCell.render

function () => undefined
Create issueEdit page
Copyright © 2021 New Relic Inc.