'use client'
import {
Chart,
ChartActions,
ChartCard,
ChartContent,
ChartHeader,
ChartTitle,
ChartEmptyState,
ChartLoadingState,
ChartBar,
ChartLine,
} from 'ui-patterns/Chart'
import { BarChart2, ExternalLink } from 'lucide-react'
import { useState, useEffect } from 'react'
export default function ComposedChartBasic() {
const [isLoading, setIsLoading] = useState(true)
const actions = [
{
label: 'Open in Logs Explorer',
onClick: () => {
alert('Ta da! You clicked me! 🎉')
},
icon: ,
},
]
const data = Array.from({ length: 46 }, (_, i) => {
const date = new Date()
date.setMinutes(date.getMinutes() - i * 5) // Each point 5 minutes apart
return {
timestamp: date.toISOString(),
standard_score: Math.floor(Math.random() * 100),
}
}).reverse()
useEffect(() => {
setTimeout(() => {
setIsLoading(false)
}, 1000)
}, [])
return (
Standard Bar Chart
}
title="No data to show"
description="It may take up to 24 hours for data to refresh"
/>
}
loadingState={}
>
`${value}k`,
width: 80,
}}
isFullHeight={true}
/>
Standard Line Chart
}
title="No data to show"
description="It may take up to 24 hours for data to refresh"
/>
}
loadingState={}
>
`${value}k`,
width: 80,
}}
isFullHeight={true}
/>
)
}