You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Nuxt 3 with Vue-echarts. The pie chart was perfect when in development mode. After compiling, the production app having trouble, the inner labels overlap each other. I was using SSR = false to generate SPA.
It seems that you are missing dependency here. You can use the codegen helper to see if you have imported all required modules from echarts: https://vue-echarts.dev/#codegen
In this case you should import { LabelLayout } from "echarts/features".
Hi @Justineo, thanks for the prompt reply. I can confirm it is now working properly after adding import { LabelLayout } from "echarts/features". The codegen helper is really useful, sorry for not discovering it early. The interesting part (and the enhancement) is no errors or warnings during developments, everything was working perfectly. Probably adding an error message can help a lot of developers when facing the same kind of problem.
e.g. when PieChart was not imported, we can see error messages in dev
[ECharts] Series pie is used but not imported.
import { PieChart } from 'echarts/charts';
echarts.use([PieChart]);
Confirmation
How are you introducing Vue-ECharts into your project?
ES Module imports
Versions
Details
Using Nuxt 3 with Vue-echarts. The pie chart was perfect when in development mode. After compiling, the production app having trouble, the inner labels overlap each other. I was using SSR = false to generate SPA.
Reproduction
https://codesandbox.io/p/sandbox/clever-cache-s7fn23?file=/app.vue:38,31
The text was updated successfully, but these errors were encountered: