-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuxtJs使用时,提示【self is not defined】 #510
Comments
When using echarts-gl, (in nextjs), need to import dymamicly. I use a single file with a chart-utility-component and imports this file dynamicly at runtime. Inside this file, imports of echarts-gl are as the docs says. import * as echarts from 'echarts';
import 'echarts-gl';
...
export default function Echart({mergeOptions, options, width, hegiht, onInit}) {
// here initialize the charts and handle all update chart logic
} const Echart = dynamic(() => import('@/components/plots/Echart'), {
loading: () => <Loading />,
ssr: false,
});
...
<Echart ... /> This is in react, not vue but maybe vue has a similar capability |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: