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

Theme is not getting updated #52

Closed
jain13aman opened this issue Dec 15, 2017 · 5 comments
Closed

Theme is not getting updated #52

jain13aman opened this issue Dec 15, 2017 · 5 comments

Comments

@jain13aman
Copy link

rough1
rough2
rough3

I am trying to add themes to my echarts but none is working and only default theme is set. I have attached 3 files. In first one, you can see I have included 'theme' property in my html file. In second file, you can see that I have imported that theme in my .angular-cli.json. In third file, you can see that my theme is there in node_modules>echarts>theme folder. Am I missing something?
I am following this link: " [https://xieziyu.github.io/ngx-echarts/#/usage/theme] ".

@xieziyu
Copy link
Owner

xieziyu commented Dec 15, 2017

Your theme path in .angular-cli.json is wrong. For your case, you should write

"../node_modules/echarts/theme/macarons.js"

@jain13aman
Copy link
Author

Thanks for your quick reply ! I tried your suggestion and it still isn't working. Please refer some other solution.
I am not sure but may be it's related with a point mentioned in documentation of Baidu. (http://echarts.baidu.com/theme-builder/)
Whenever I try to add a custom theme, it asks me to follow 3 steps.
rough4 Please refer to the 3rd step in the attached file. I am not sure if I have to use in-built themes also, like that only. I don't know where should I use the 3rd step. It's not working in my component or module.
All of your other demos are working. Only theme is not getting updated in each of them.

@xieziyu
Copy link
Owner

xieziyu commented Dec 15, 2017

@jain13aman
You don't need to follow the steps. ngx-echarts has done that for you.

It's obviously the theme .js file is not correctly imported in your project. Does your project depend on other module resolvers rather than angular-cli?

My demo project is generated by angular-cli, so I only need to modify .angular-cli.json to import the theme file.

@jain13aman
Copy link
Author

Thanks for your quick response. It worked for me after I restarted my project. Kinda weird because I was regularly saving all my files and my compiler was also working. May be some bug is there in visual studio code. I want to thank you for helping us out through demo !! Cheers ! I will be closing this issue now.

@xieziyu
Copy link
Owner

xieziyu commented Dec 15, 2017

@jain13aman
Good news! As far as I know, angular-cli will not reload .angular-cli.json file if ng serve is working. So any changes in .angular-cli.json requires a restart.

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

2 participants