geekzonehosting
Posts: 1
Joined: Fri Oct 14, 2022 6:38 am

Drupal 9 support for Highcharts Maps?

Greetings :D

I am building a Drupal 9 powered web site and I am working on integrating Highcharts and Highcharts Maps in connection with the Drupal/Charts module and the Drupal/views_json_source module to stream in data from an api.

I have been successful in using the Charts module to render data driven charts with much success and have been very happy with my results.

However, when I began to try to use the Highcharts Maps library, I found that the Drupal/Charts module does not have any support for that library.

I was successful in rendering a custom block with an <iframe> tag which displayed a standalone map but the map was not connected to the views mechanics, so it was not able to be populated with data from the api driven view that was populating the charts.

So, I am asking the users of this system if any of you have implemented injecting the Highcharts Maps into a Drupal 9 site with success and would be willing to share your site build code with me or contribute it to the Drupal.org Module directory?
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Drupal 9 support for Highcharts Maps?

Hello geekzonehosting!
Welcome to our forum and thanks for contacting us with your question!

Sadly, no one from our support team has experience using Drupal + Highcharts. Maybe someone from the community would help you in this matter, but it could take some time. From my side, I can help you with knowledge of the Highcharts library. I don't know if Drupal has any listeners, which can call the Highcharts methods to change the charts, but if there is a listener, when your data is ready from API call you can use series.setData method (https://api.highcharts.com/class-refere ... es#setData), which will set a full array of data to a series or if you would like to add a specific point you can use series.addPoint method (https://api.highcharts.com/class-refere ... s#addPoint).

Let me know if you have any further questions related to Highcharts.
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Maps”