tracyaxelson
Posts: 2
Joined: Tue Jul 05, 2022 3:29 pm

Single US State/Town Data

Hi there. I'm trying to figure out which map I can use to only show a single US State, such as Massachusetts, and a series of data corresponding to towns in MA.
User avatar
dawid.d
Site Moderator
Posts: 1222
Joined: Thu Oct 06, 2022 11:31 am

Re: Single US State/Town Data

Hello,

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

Of course, Highcharts Maps also includes US state maps, so you don't have to custom define them. See the demo below.
Demo: https://jsfiddle.net/gh/get/jquery/1.11 ... /us-ma-all

Let me know if that is what you were looking for!
Best regards
Dawid Draguła
Highcharts Developer
tracyaxelson
Posts: 2
Joined: Tue Jul 05, 2022 3:29 pm

Re: Single US State/Town Data

Thank you so much. I am looking to list my data by towns though, not by county.

I am wondering if there is another set of data that I can use to construct the map:

const data = [
['us-ma-007', 10], ['us-ma-019', 11], ['us-ma-001', 12],
['us-ma-027', 13], ['us-ma-015', 14], ['us-ma-021', 15],
['us-ma-005', 16], ['us-ma-023', 17], ['us-ma-013', 18],
['us-ma-025', 19], ['us-ma-009', 20], ['us-ma-017', 21],
['us-ma-003', 22], ['us-ma-011', 23]
];

I haven't poured over the javascript itself yet, maybe the towns are listed in there.
User avatar
dawid.d
Site Moderator
Posts: 1222
Joined: Thu Oct 06, 2022 11:31 am

Re: Single US State/Town Data

Hi,

All available map data provided by Highcharts can be found here: https://code.highcharts.com/mapdata/ If you need something more, it is necessary to create a custom dataset.

There is an article on how to create custom maps:
https://www.highcharts.com/docs/maps/create-custom-maps

I hope that was helpful in any way
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Maps”