score:5
Accepted answer
If you want to use the USA map, you need to change the url to: "https://code.highcharts.com/mapdata/countries/us/us-all.geo.json"
and the postal-code from US.MA
to MA
:
this.mapData.getWorld().then(r => {
...
for (let i in this.state.mapData["features"]) {
...
var postalCode = mapInfo.properties["postal-code"];
...
}
...
});
Live demo: https://codesandbox.io/s/highcharts-react-demo-jmu5h
To use the word map, you need to also change the part related with the postal-code and joinBy
property:
series: [{
joinBy: ['iso-a2', 'code'],
...
}]
this.mapData.getWorld().then(r => {
...
for (let i in this.state.mapData["features"]) {
let mapInfo = this.state.mapData["features"][i];
if (mapInfo["id"]) {
var code = mapInfo["id"];
...
this.options.series[0].data.push({
"code": code,
...
});
}
}
...
});
Live demo: https://codesandbox.io/s/highcharts-react-demo-sxfr2
API Reference: https://api.highcharts.com/highmaps/series.map.joinBy
Source: stackoverflow.com
Related Query
- How to use this highchart map in reactJS
- How to use highstocks navigator on a highchart
- How can I extend the lines of this Highchart series to the edges of my chart area?
- How to use Highcharts to implement this dynamically shifting from right to left effect?
- How do I redesign this highchart
- how to use hcmap highchart R shiny
- How to Use String value in Highchart Series
- How to use Highchart auto calculated min and max values, unless they are above or below a predefined min and max
- how to use highcharts tooltip formatter in python code
- How to use highchart 3d with angular 5?
- How to use highchart pattern fill in angular?
- How to use candlestick highchart in Angular2?
- How to use HighChart in offline?
- How to use highcharts in reactjs with fetched data from API
- How to resize this highchart graph?
- Highchart : How to use images when using "General drawing"
- How implement a ball similar as in this image use Highcharts?
- SQL query for a graphic chart. Not sure about how to use JOIN in this case
- How to use Highchart formatter in rails?
- HighChart how to use object array
- How to parse datetime for use in highchart graph?
- How to implement date selector to HighChart StockChart in reactjs (without jQuery)
- I'm trying to use HighChart map and solid guage they both work for my data independetly but I get get lot of errors on I put them on a file
- how to use json for Wind rose polar highchart insted of table data
- How to use a multi-layer map with countries and lakes with Highmaps?
- How to use a custom JSON map in Highmaps
- How to make this as a HighChart (picture attached)
- How to use highchart boost library with D3?
- How to implement motion video highchart on Reactjs
- How to use Sankey chart from highchart in Angular5
More Query from same tag
- Highlight a line with different color in Parallel coordinate chart with Highcharts
- Highstock/Highchart cannot set Individual Point color
- How can I achieve this using HighCharts library
- Tree Map in high charts fourth level is not working
- Can the crosshair in a Highcharts chart set and be moved programmatically?
- How to drilldown a pie highchart into multiple containers using renderTo or redraw method?
- Highstock stochastic %d is not correct
- Highcharts stack graph stack not visible
- Remove label from chart when exporting
- Data manipulation for heatmap
- How to create a range between series?
- Highcharts- this.category returns undefined
- How to generate PDF Files based on a HTML+CSS+jQuery page containt
- Highcharts customEvents plugin + Highstock Error
- Big Tooltip over points - Highcharts
- javascript highcharts jQuery issue
- How to create multiple highchart and print in HTML page by using for loop?
- dashboard-style page with Highcharts graphs
- highchart : Add the series name on the column chart
- Set line opacity in highchart line chart
- Error while plotting data in rchart using HighChart
- Highcharts-serverside-export not rendering graph with Rhino 1.7R3
- Highcharts Polar Chart customization
- Highcharts: How we can sort series with animation?
- Combination of Scatter HighChart with Polynomial Chart
- Fix both y-axis to 0 highcharts
- Exporting highstock chart data shows data discrepancies
- Is it possible to have an adjustable line in highcharts stack area graph?
- How to draw multiple segments overlapping and non overlapping in high-charts?
- Highcharts Barchart Category Word breaks