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
MapChartcan now use any projection supported by d3-geo.Projection.d3Projectionproperty 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,deltaGammaadded toMapChart. Together with already existingdeltaLongitudeallows rotating maps in any possible direction.panBehaviorproperty added toMapChart. Values: “move” (default), “rotateLat“, “rotateLong”, “rotateLongLat”. Indicate what should happen when map is dragged.ignoreBoundsadded toMapSeries. Specifies if this series must be included when calculating bounds of the map.calculateVisualCenteradded toMapPolygonSeries. Specifies if map polygons should calculate their visual center. Visual center is good for placing labels.visualLongitudeandvisualLatitudegetters added toMapPolygon. They return coordinates ifcalculateVisualCenterof series is set totrue. You can also set them manually.getCircle()andgetBackground()methods added toMapUtils.GraticuleandGraticuleSeriesclasses added. Those allow creating graticules (map grid).backgroundSeriesadded 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 backwards compatible, beware of and report any issues.
day-night-mapandmorphing-countriesdemos were changed to work properly with new version.- When adding a
HeatLegendtoMapChartitsvalign = "bottom"is no longer set by default. Set it explicitly if you need legend to be bottom-aligned.
Fixed
rtlsetting 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.