-
Notifications
You must be signed in to change notification settings - Fork 151
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
Highcharts Maps initializing Question #228
Comments
Hi, Thanks for the question! I understand your question, but it is not related to the It doesn't seem to work in with Vanilla JS in either normal charts: https://jsfiddle.net/BlackLabel/xny05arq/ nor map charts: https://jsfiddle.net/BlackLabel/ekbm2qnh/ As you can read in the API (https://api.highcharts.com/class-reference/Highcharts.Chart#update):
So I'd recommend you use Demo for a standard chart: https://jsfiddle.net/BlackLabel/bv59r8ze/ Let me know if that helps! |
Hi, It's interesting, the vanilla js demos you provided match the below concept
and seems it also matches the explanation for the special cases from https://api.highcharts.com/class-reference/Highcharts.Chart#update Then, a new question, is the chart updating logic behind Here are the links So I feel the test results have some conflicts with the concept you mentioned, and it only happens to the map chart. |
Hi, You're right! If you take a look at line 52 of As you can read in the API (https://api.highcharts.com/class-reference/Highcharts.Chart#update), the third argument is Here's how it works for a normal chart: https://jsfiddle.net/BlackLabel/pwnm93gj/ However, I've taken a closer look to what happens to So until it gets solved, I would recommend you use Let me know if you have any more questions! |
Closed as it will be solved within the Highcharts repo. |
Hi, Thank you for your response and recommendation. What I wanted was to share some of my findings that might confuse highchart-vue users when they're using this wrapper to create a mapChart. With the above demos and our discussion, I think highchart-vue users will have a better understanding of creating mapChart via this wrapper when they find this issue content. I also found another alternative which is different to your recommendation. I will share it here. Anyone who is interested in it could compare it with the above failed one (https://codesandbox.io/s/sweet-sammet-s42sp1?file=/src/components/Chart.vue). |
Thank you for your detailed descriptions! We appreciate that. Feel free to post any questions on our forum or GitHub if they arise. |
I try to initialize a mapChart.
Context:
chartOptions: { };
But it fails to show the map, here is the live demo link
https://codesandbox.io/s/sweet-sammet-s42sp1?file=/src/components/Chart.vue
However, if a default value like below given to the chartOptions state
It will work, here is the demo link
https://codesandbox.io/s/red-cdn-pfl7xh?file=/src/components/Chart.vue
Obviously, in both two demos, after loading the map option in the mounted(), the chartOptions state will be the same.
Then why the first demo fails to initialize the map view? (so far, from my testing experience, it doesn't happen on other normal types of charts, but only happens when initializing mapChart)
The text was updated successfully, but these errors were encountered: