DB-GPT/web/components/chat/chat-content/vis-chart.tsx
Dreammy23 471689ba20
feat(web): Unified frontend code style (#1923)
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
Co-authored-by: 谨欣 <echo.cmy@antgroup.com>
Co-authored-by: 严志勇 <yanzhiyong@tiansuixiansheng.com>
Co-authored-by: yanzhiyong <932374019@qq.com>
2024-08-30 14:03:06 +08:00

23 lines
447 B
TypeScript

import { BackEndChartType } from '@/components/chart';
import { Datum } from '@antv/ava';
import ChartView from './chart-view';
interface Props {
data: {
data: Datum[];
describe: string;
title: string;
type: BackEndChartType;
sql: string;
};
}
function VisChart({ data }: Props) {
if (!data) {
return null;
}
return <ChartView data={data?.data} type={data?.type} sql={data?.sql} />;
}
export default VisChart;