I'd like to use one set of borderColor and width values for counties and another set for state lines in highcharter as done in this jsfiddle link.
series: [{
mapData: countiesMap,
data: data,
joinBy: ['hc-key', 'code'],
name: 'Unemployment rate',
tooltip: {
valueSuffix: '%'
},
borderWidth: 0.5,
states: {
hover: {
color: '#bada55'
}
}
}, {
type: 'mapline',
name: 'State borders',
data: [lines[0]],
color: 'white'
}, {
type: 'mapline',
name: 'Separator',
data: [lines[1]],
color: 'gray'
}]
However, I don't understand the data structure and I don't see how the highcharter api allows this to be done. Is this kind of map possible? My first instinct was to add a polygon layer without fill for state borders but this doesn't seem to be the approach to use in highmaps/highcharts.
The effect I'm after is shown here. Bold state borders with lighter county borders. Sorry, not enough reputation to embed images.
Basically this is same answer by Roco, but is using highcharter.
live: http://rpubs.com/jbkunst/is-it-possible-to-include-maplines-in-highcharter-maps
code:
Hope it helps.
Thanks for use the package!
If you want to change the width of the borders, you would normally do that with via
borderWidth
property, like you already do for the county lines.Your state lines are of different type, they belong to the
mapline
type. For this type, the documentation specifies that you need to uselineWidth
rather thanborderWidth
. This is what you need to change:This is an example of how I changed your initial JSFiddle to make the state lines much thicker than the county lines: JSFiddle here