• /
  • Log in

AreaChart

Creates a area chart. Data can either be obtained by performing a NRQL query against a particular account, or it can be passed through the data prop.

The data format is a series of objects, each containing metadata and data. Each data contains both values from this point, and x and y keys used to plot the chart.

Usage

import { AreaChart } from 'nr1'

Examples

Props

accountIdnumber

Sets the account ID to perform the query.

classNamestring

Appends class names to the component.

dataobject[]

Data is an array of objects where each object represents a series to be drawn. Each series comprises visualization metadata and an array of data points.

fullHeightboolean
DEFAULT
false

Expands the chart to occupy all available height.

fullWidthboolean
DEFAULT
false

Expands the chart to occupy all available width.

onClickAreafunction

Adds a click listener that gets triggered when the user clicks over the corresponding area.

function () => undefined
onClickEventfunction

Adds a click listener that gets triggered when the user clicks over the corresponding event.

function () => undefined
onClickLinefunction

Adds a click listener that gets triggered when the user clicks over the corresponding line.

function () => undefined
onHoverAreafunction

Adds a hover listener that gets triggered when the cursor is hovered over the corresponding area.

function () => undefined
onHoverEventfunction

Adds a hover listener that gets triggered when the cursor is hovered over the corresponding event.

function () => undefined
onHoverLinefunction

Adds a hover listener that gets triggered when the cursor is hovered over the corresponding line.

function () => undefined
querystring

NRQL query used for fetching data. The query is performed against the provided accountId.

styleobject

Inline style for custom styling.

Methods

AreaChart.render

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