mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-28 06:17:14 +00:00
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>
23 lines
447 B
TypeScript
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;
|