A Massive Maps Upgrade in amCharts 4.3

The just-released amCharts 4.3 includes a slew of exciting updates to maps functionality. From new projections to the additional rotation and panning features and more, the new release delivers a bunch of exciting goodies for those investing in map charts.

You can start using all of these features right away. Or check the updated Anatomy of Map Chart article in the documentation for technical details.

Here’s the complete list of what was added, changed and fixed in version 4.3:

Added

  • MapChart can now use any projection supported by d3-geo. Projection.d3Projection property added and you can set any d3-geo projection using it, like: mapChart.projection.d3Projection = am4maps.d3geo.geoConicEquidistant();.
  • Albers, AlbersUsa, AzimuthalEqualArea, EqualEarth, NaturalEarth1, Stereographic projection classes added (use them regularly like: mapChart.projection = new EqualEarth()).
  • deltaLatitude, deltaGamma added to MapChart. Together with already existing deltaLongitude allows rotating maps in any possible direction.
  • panBehavior property added to MapChart. Values: “move” (default), “rotateLat“, “rotateLong”, “rotateLongLat”. Indicate what should happen when map is dragged.
  • ignoreBounds added to MapSeries. Specifies if this series must be included when calculating bounds of the map.
  • calculateVisualCenter added to MapPolygonSeries. Specifies if map polygons should calculate their visual center. Visual center is good for placing labels.
  • visualLongitude and visualLatitude getters added to MapPolygon. They return coordinates if calculateVisualCenter of series is set to true. You can also set them manually.
  • getCircle() and getBackground() methods added to MapUtils.
  • Graticule and GraticuleSeries classed added. Those allow creating graticules (map grid).
  • backgroundSeries added to MapChart. Allows creating a map-shaped background fill.

Changed

  • Engine behind rendering of maps was changed to use d3-geo.While the change should be ackwards compatible, beware of and report any issues.
  • day-night-map and morphing-countries demos we changed to work properly with new version.
  • When adding a HeatLegend to MapChart its valign = "bottom" is no longer set by default. Set it explicitly if you need legend to bottom-aligned.

Fixed

  • rtl setting was not being inherited properly.
  • Fixed RTL behavior for labels.
  • Disposing a hovered chart with scroll pan enabled used to leave whole document with disabled wheel scroll.