import dynamic from "next/dynamic" ; import { BarChartOutputType } from "@koh/common" ; import React , { ReactElement } from "react" ; const Bar = dynamic ( ( ) => import ( "@ant-design/charts" ) . then ( ( charts ) => charts . Bar ) , { ssr : false , } ) ; interface BarChartTypes { output : BarChartOutputType ; } function BarChartComponent ( { output } ) { const config = { data : output . data , xField : output . xField , yField : output . yField , seriesField : output . seriesField , legend : { position : "top-left" } , xAxisName : output . xAxisName , yAxisName : output . yAxisName , } ; return < Bar { ... config } / > ; } export default BarChartComponent ;