Timeline is a vertically oriented timeline showing a series of events in a summary but with a drilldown for additional detail.
- Install nr1-community
npm i @newrelic/nr1-community
- Add the styles for the component to the top of your stylesheet (probably named
styles.scss
):
@import '~@newrelic/nr1-community/dist/index.css';
import { Timeline } from '@newrelic/nr1-community';
<NrqlQuery
accountId={"your account id"}
query="SELECT * FROM PageAction SINCE 60 MINUTES AGO limit 7"
>
{({ data }) => {
if (data) {
const events = data[0].data;
return <Timeline data={events} />;
}
return null;
}}
</NrqlQuery>
Note: Launch the /demo Nerdpack to see more advanced examples and full documentation