Price Chart
The PriceChart component is a chart that displays the price of a token over time.
PriceChart
$WIF price over time
Installation
Install Murphy TokenIcon
pnpm dlx shadcn@canary add https://onchainkit.murphyai.dev//r/token-icon.json
Install Murphy PriceChart
pnpm dlx shadcn@canary add https://onchainkit.murphyai.dev//r/price-chart.json
Basic Usage
import { PriceChart } from "@/components/ui/murphy/price-chart";<PriceChart
  asset={wifAsset}
  description="$WIF price over time"
  data={chartData}
  timeScale={timestamps[dateRange].timeScale}
  onDateRangeChange={(value) => setDateRange(value as DateRangeKey)}
  dateRangeOptions={["1D", "1W", "1M", "1Y"]}
  defaultDateRange={dateRange}
/>  Props
| Name | Type | Default | 
|---|---|---|
asset | SolAsset | undefined | 
description | string | |
data | data: {timestamp: number; price: number; }[]; | [] | 
timeScale | "time" | "day" | "date" | "month" | "time" | 
title | string | |
onDateRangeChange | (value: DateRangeKey) => void | |
dateRangeOptions | string[] | |
defaultDateRange | string |