Rendering

Tremor

Tremor

Setup

Install @typelytics/tremor

npm install @typelytics/tremor
 
yarn add @typelytics/tremor
 
pnpm add @typelytics/tremor

Usage

You can either use an individual chart component or a generic chart component which will render any data in the correct format.

Individual chart components

import { LineChart } from "@typelytics/tremor";
 
<LineChart ...{props}/>

Generic chart component

import { Chart } from "@typelytics/tremor";
 
<Chart type="line" ...{props}/>

With Query

const data = await posthog
    .query()
    .addSeries("$pageview", {
      sampling: "total",
    })
    .execute({
      groupBy: "day",
      type: "line",
    });
 
return <Chart {...data} />