我正在尝试将 apexcharts 用于 next.js 应用程序,但它返回窗口未定义。
\n我希望得到任何帮助。
\n有人知道发生了什么以及为什么吗?
\nimport React from 'react';\nimport Chart from 'react-apexcharts';\n\nexport default class Graficos extends React.Component <{}, { options: any, series: any }> {\n constructor(props:any) {\n super(props);\n\n this.state = {\n options: {\n chart: {\n id: "basic-bar"\n },\n xaxis: {\n categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]\n }\n },\n series: [\n {\n name: "series-1",\n data: [30, 40, 45, 50, 49, 60, 70, 91]\n }\n ]\n };\n }\n \n render() {\n return (\n …
Run Code Online (Sandbox Code Playgroud)