Bar chart styling.

This commit is contained in:
Mike Cao 2020-08-27 18:44:20 -07:00
parent d936ecc86e
commit a7e7469d22
9 changed files with 130 additions and 125 deletions

View file

@ -2,7 +2,7 @@ import React from 'react';
import MetricsTable from './MetricsTable';
import styles from './EventsTable.module.css';
export default function DevicesTable({
export default function EventsTable({
websiteId,
startDate,
endDate,
@ -19,14 +19,19 @@ export default function DevicesTable({
startDate={startDate}
endDate={endDate}
limit={limit}
renderLabel={({ w, x }) => (
<>
<span className={styles.type}>{w}</span>
{x}
</>
)}
renderLabel={({ x }) => <Label value={x} />}
onExpand={onExpand}
onDataLoad={onDataLoad}
/>
);
}
const Label = ({ value }) => {
const [event, label] = value.split(':');
return (
<>
<span className={styles.type}>{event}</span>
{label}
</>
);
};