import React from 'react' import { Line } from 'react-chartjs-2' import { CategoryScale, Chart, LinearScale, PointElement, LineElement, Title, Tooltip, Legend, } from 'chart.js' import { Contract } from '../lib/firebase/contracts' import { Col } from './layout/col' import { Row } from './layout/row' import { Spacer } from './layout/spacer' // Auto import doesn't work for some reason... // So we manually register ChartJS components instead: Chart.register( CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend ) const chartData = { labels: Array.from({ length: 0 }, (_, i) => i + 1), datasets: [ { label: 'Implied probability', data: [], borderColor: 'rgb(75, 192, 192)', }, ], } export const ContractOverview = (props: { contract: Contract }) => { const { contract } = props return (