vis-chart.tsx 447 B

12345678910111213141516171819202122
  1. import { BackEndChartType } from '@/components/chart';
  2. import { Datum } from '@antv/ava';
  3. import ChartView from './chart-view';
  4. interface Props {
  5. data: {
  6. data: Datum[];
  7. describe: string;
  8. title: string;
  9. type: BackEndChartType;
  10. sql: string;
  11. };
  12. }
  13. function VisChart({ data }: Props) {
  14. if (!data) {
  15. return null;
  16. }
  17. return <ChartView data={data?.data} type={data?.type} sql={data?.sql} />;
  18. }
  19. export default VisChart;