Skip to content
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

echarts import didn't work unless I did something different #440

Open
jpike88 opened this issue Dec 5, 2024 · 4 comments
Open

echarts import didn't work unless I did something different #440

jpike88 opened this issue Dec 5, 2024 · 4 comments

Comments

@jpike88
Copy link

jpike88 commented Dec 5, 2024

see problem and resolution in here

apache/echarts#14138 (comment)

Your code has import * as echarts from 'echarts/core'; as the import statement, when I did this I ran into a problem similar to the linked issue (yes I know it's about Vue but this happens in angular too).

Just an FYI

@alanpurple
Copy link

you should import renderer and configure too

@gurelsoycaner
Copy link

What's the solution for this problem in angular environment?

@gurelsoycaner
Copy link

you should import renderer and configure too

can you please explain how?

@alanpurple
Copy link

you need to add something like this

import * as echarts from 'echarts/core';
import { SVGRenderer } from 'echarts/renderers';
import { LineChart } from 'echarts/charts';
import { TooltipComponent, AxisPointerComponent } from 'echarts/components'
echarts.use([SVGRenderer, LineChart, TooltipComponent, AxisPointerComponent]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants