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

Import a echart theme with echarts v5.5.0 and ngx-echarts v15.0.3 #418

Open
lmarquinez opened this issue Mar 21, 2024 · 0 comments
Open

Comments

@lmarquinez
Copy link

I was using echarts v5.4.3 with ngx-echarts 15.0.3 and angular 15, but when I updated echarts to v5.5.0 I notice that the theme is not working.

I have an application as a library where I am using the echarts package to create some graphics and there it is working correctly, I have problems in the application when I install this package. Echarts is a peerDependency of this package. Should I add something in the angular.json or in some other file? For example in the scripts section of angular.json like:

 "scripts": [
      "node_modules/echarts/dist/echarts.js",
      "node_modules/echarts/theme/macarons.js",
 ],

In the aplication as library I am only importing the theme in the module this way:

import 'echarts/theme/macarons.js';
import * as echarts from 'echarts';
import { NgxEchartsModule } from 'ngx-echarts';

@NgModule({
  imports: [
    NgxEchartsModule.forRoot({
      echarts
    })
  ],

And I am using this way to create the graphics:

<div echarts [options]="echartsOption" theme="macarons"></div>

@lmarquinez lmarquinez changed the title Import a echart theme with echarts v5.50 and ngx-echarts v15.0.3 Import a echart theme with echarts v5.5.0 and ngx-echarts v15.0.3 Mar 21, 2024
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

1 participant