amCharts 5: Charts 5.x

Released: Nov 3, 2021

Updates in 5.x

5.1.0

Last Updated Jan 20, 2022

Features

  • Added a new Root setting: timezone. E.g. "America/Vancouver", "Australia/Sydney", "UTC".
  • Added a new export CSV option: addBOM (default: true) which indicates whether to add BOM characters at start of CSV output so that data viewer (e.g. Microsoft Excel) knows that UTF-8 data is being exported.
  • Added new methods for Adapters: remove(key), disable(key), and enable(key).
  • Added GaplessDateAxis which is a version of DateAxis that removes data-less intervals from its scale. CategoryAxis is being deprecated in favor of GaplessDateAxis.
  • Added Timezone support.
  • Added a new Component method: markDirtyValues() which will re-evaluate elements of the component that are data-reliant, such as axis labels.

Fixes

  • Clearing axis ranges from Axis and Series was not working properly.
  • Slice with negative arc was ignoring cornerRadius property.
  • groupDataDisabled on XYSeries was not working if set to true.
  • Axis header was not updating its position if axes were stacked and size of an axis was updated.
  • Disposing of charts with a lot of elements was quite slow.
  • Series stacks with all-zero values could cause all stacks to disappear on zoom.

5.0.21

Last Updated Jan 11, 2022

Features

  • Added a new Sprite setting: forceInactive. If set to true, it will override interactive setting as well as ignore any interaction events set on the element.
  • Added cursorhidden event to XYCursor. Dispatched when user rolls-out of the chart plot area and cursor is hidden.
  • Added a new Component method: markDirtyValues(). Forces a repaint of the element which relies on data.
  • Value (4th parameter of the Heat rule's customFunction) will now receive actual value of the target data item, not interpolated calculated setting value.

Fixes

  • Fixing bug when not passing the duration to the animate method.
  • Horizontal and vertical layouts with width/height set in percents plus minWidth/minHeight/maxWidth/maxHeight set were arranging items incorrectly.
  • Very small slices with cornerRadius > 0 were being drawn as a full circle.
  • SliceGrouper with was not zooming out properly if there was no legend in chart.
  • Changing groupData from false to true on DateAxis was not working when doing so after the chart was built.

5.0.20

Last Updated Dec 30, 2021

Fixes

  • SliceGrouper with clickBehavior = "zoom" was not zooming out properly.
  • GridLayout could leave empty gaps if some of the items in it were hidden.
  • dragging sprites within rotated containers was not working properly.
  • Null value was breaking stacking of columns in some cases.
  • Fixing tooltips being broken inside of shadow DOM.

5.0.19

Last Updated Dec 27, 2021

Features

  • groupDataDisabled setting added to XYSeries. If set to false will exclude series from data grouping mechanism, even if it is enabled on related DateSeries.
  • New plugin SliceGrouper. Can be used to automatically group small slices on percent charts like Pie, Funnel, etc.

Fixes

  • If data was added to percent series after initial data was already processed, the bew slices would get colors from the start of the color set.
  • Multiple square bracket and apostrophe escaping was not working properly.
  • A JS error could occur when changing XYSeries data with less data items then there were before.
  • PieSeries were not arranging its labels properly in some cases.
  • XYCursor taps were not working properly after chart zoom on touch devices.

5.0.18

Last Updated Dec 19, 2021

Features

  • When auto-wrapping labels, text will no longer break on dots to prevent fractional numbers from wrapping.
  • Scrollable Container's scrollbar will auto-hide if contents fit in it without scrolling.

Fixes

  • Disabling click-toggling of legend, was disabling hover events, too.
  • ResponsiveTheme's custom rules were not working properly.
  • Exporting was not applying proper background color to exported images.
  • CategoryDateAxis grid and labels placing algorithm improved.
  • Sometimes bullets of XYChart were not being properly clipped by the bounds of the plot area.
  • Memory leak was fixed.

5.0.17

Last Updated Dec 15, 2021

Fixes

  • WordCloud was not coloring words even if colors ColorSet was set or data with colors was used.
  • WordCloud was not showing anything if all words had the same weight.
  • Adding type and main fields to package.json.
  • Fixed scrollbar issue with non-animated theme where clicking on a background of a scrollbar would not move to target position.

5.0.16

Last Updated Dec 10, 2021

Features

  • tooltipPositionX and tooltipPositionY have been added to XYSeries (possible values: "value", "open", "low", and "high") which indicates which data item value tooltip should be anchored to.
  • New settings have been added for exporting formatting durations: durationFields, durationFormat and durationUnit.
  • showTooltipOn (default: "hover") has been added to Sprite. Another option is "always" which will show a tooltip without any interaction with the element.
  • Hierarchy will now set bottom-level node's cursorOverStyle: "default" via a theme, instead of hardcoding, so it can be overridden via node templates.

Fixes

  • Stacked XYSeries with missing values and valueYShow set to "valueYTotalPercent" or valueXShow set to "valueXTotalPercent" were not showing columns/lines.
  • Changing legend position from bottom/top to right/left was not arranging elements properly.
  • If Slice of a PieSeries had a templateField set, legend marker was not using all the settings of that slice properly.
  • Bullets were causing performance issues when data grouping was turned on.
  • Label underline was not inheriting label's color properly.
  • Label underline was not being placed properly on center/right-aligned labels.

5.0.15

Last Updated Dec 7, 2021

Features

  • Added experimental support for underlined text. It can be enabled via Label setting fontDecoration: "underline", or via in-line style block ([underline]).
  • Added three new accessibility settings: ariaControls, ariaValueMin, and ariaValueMax.
  • Focus elements used for accessibility are now enclosed in a container with role="application" which helps avoid "scan mode" in some screen readers.
  • Tapping outside chart will now hide XYCursor.

Fixes

  • Sometimes XYCursor would stay on pointer moved out of chart area quickly.
  • Fixed memory leak.
  • Arabic text (and possibly other RTL languages) was not being displayed right on circular labels, even with direction = "rtl" set.
  • Arabic text (direction = "rtl") was being misplaced in tooltips.
  • New line was resetting current in-line text style.

5.0.14

Last Updated Dec 1, 2021

Features

  • When setting markerState on Annotator it will now automatically render annotations without the need to open annotation mode.

Fixes

  • Updating data dynamically on series in all-ValueAxis setups.
  • Removing axis range was not working properly.
  • Closing annotation mode would not make chart regain its interactivity.

5.0.13

Last Updated Nov 25, 2021

Features

  • Added clickTarget (possible vales: "itemContainer" (default), "marker", and "none") to Legend. Use clickTarget: "none" to disable toggling of legend items.
  • Setting wheelX/wheelY on XYChart or MapChart no longer marks their plot areas as wheelable.

Fixes

  • In some cases using oversizedBehavior = "wrap" on labels in super small spaces the chart would hang.
  • Updating data on a ForcedDirectedTree may cause JS errors.
  • Hovering legend item of a hidden slice no longer tries to show the tooltip for it.
  • Drill-down maps were displaying country in a wrong position after drill-down.

5.0.12

Last Updated Nov 24, 2021

Features

  • Added atitudeField and longitudeField to MapPointSeries for an easier way to add data.
  • Improved tooltip arrangement algorithm with for charts with several XY series.

Fixes

  • Axis fill rule of DateAxis sometimes skipped an interval or was drawn two fills in a row. Also, with months as interval between grids, the end of the fill was not at exact position where it should have been.
  • When setting new data for a series, if new data has less items than series had before, a JS error could occur.

5.0.11

Last Updated Nov 23, 2021

Features

  • Added a new FPS property on Root which defines the maximum FPS. Set it 30 or lower if performance is an issue.
  • Range theme tag has been added to all axis range elements (axisFill, grid, tick and label) so you can target specific theme rules.
  • Range and series theme tags have been added to all series axis range elements (axisFill, grid, tick and label) so you can target specific theme rules.
  • A axisFill of an axis range will no longer be shown unless its "visible: true" setting is set.

Fixes

  • Adapter for text of a Label was not kicking in when data item of its Tooltip (or other parent of a Label) was changed.
  • Legend marker/label was not returning to a default state when clicked on a disabled item in some cases when Animated theme was not used.
  • Axis range fill tooltip was being shown in a wrong position.

5.0.10

Last Updated Nov 22, 2021

Fixes

  • LineSeries strokes in an axis range were using wrong template, which could result incorrect colors or other settings (since 5.0.9).
  • When data was updated on a live chart and the chart was not fully zoomed-out, some unnecessary Y axis animation used to happen after data update.

5.0.9

Last Updated Nov 22, 2021

Features

  • maxTooltipDistance in XYCursor now accepts -1 as a value, which means that only a single tooltip will be shown, even if multiple data items share the same value.

Fixes

  • GraticuleSeries was broken.

5.0.8

Last Updated Nov 21, 2021

Features

  • Trying to create a Root in a container that already contains a chart will now result in a hard error.
  • All XYSeries now use both a main template and an axis range template (the latter has priority) when decorating columns/lines/etc for the sections covered by axis range.

Fixes

  • Axis fills were not working properly.
  • Since 5.0.6: Map was zoomed to incorrect position in some specific cases when goHome() method was called.

5.0.7

Last Updated Nov 19, 2021

Features

  • A new setting pan (default: "none") has been added to AxisRendererX and AxisRendererY. If set to "zoom" will enable zoom of axis scale by dragging in axis label area.
  • Heat rules will not longer apply setting value if target data item does not have any numeric value.
  • Hovering legend item will now simulate hover on related item on some charts (e.g. PieSeries, Hierarchy, Venn).

Fixes

  • HeatLegend was acting out when its showValue() method was called with non-numeric parameter.
  • If series was pre-hidden before chart init, its status was not being correctly reflected in related legend item.
  • Locales in script version were not working properly.

5.0.6

Last Updated Nov 18, 2021

Features

  • Accessibility: Added new setting on Sprite: focusableGroup. If set, TAB key will iterate through first elements of each focusable group, allowing user to select within group using arrow keys.
  • Added new Root setting: autoResize (default: true). If set to false, the chart will not automatically resize itself when width/height of its container changes. Use resize() method to resize manually.
  • Added new Root method: resize(). Resizes chart to fit container dimensions, if automatic resizing is disabled (root.autoResize = false).
  • Global am5.p0 shortcut function has been added which returns Percent(0).
  • All elements now have a read-only property root which holds their Root object.
  • Added new Sprite events: rightclick and middleclick. Please note that adding rightclick event will not disable possible contextual menu on right-mouse click.
  • Added new XYCursor setting: snapToSeriesBy (default: "xy"). Defines in which direction to look when searching for the nearest data item to snap to. Possible values: "xy" (default), "x", and "y".
  • If set the wheel event now fires even if wheelable = false. This allows the capturing of wheel events on elements without interfering with scroll of the document.

Fixes

  • oversizedBehavior on Label (still) was not handling maxWidth and maxHeight values properly (since 5.0.2).
  • Dynamically updating geoJSON on a MapPolygonSeries was not working properly in some cases.

5.0.5

Last Updated Nov 15, 2021

Features

  • Added root element method: moveDOM() (accepts element id or reference as a parameter). Can be used to move whole chart to some other container within DOM.

Fixes

  • ExportingMenu was interfering with functionality of form elements on the same page (e.g. select).
  • Fixed issues with text kerning with styling blocks mid-word.
  • Animating values of width/height settings using percent values was not working properly.

5.00[beta] - 5.0.4

Last Updated Nov 12, 2021

Features

  • Added
    • panstarted, panended, and wheelended events added to XYChart.
    • radius() and baseRadius() methods added to RadialLabel. Return radius/baseRadius value in pixels, calculated based on all the other settings.
    • Global function am5.ready() added. Accepts a function as a parameter, which is executed when DOM is ready.
    • Triangle class added.
    • labelText setting added to Tooltip. If set the text will automatically be applied to tooltip's label.
    • If a Bullet has dynamic: true set, its sprite size will be marked as dirty each time the bullet updates its position.
    • Axis name added to AxisLabel when created so it could be targeted by axis type in theme rules.
    • dRadius and dInnerRadius settings added to Slice (default: 0). Allows tweaking radius/innerRadius values in charts where these settings are set by the chart (PieSeries, circular/radial axis fills, etc.).
    • adjustBulletPosition added to BaseColumnSeries (default: true). If set to false, bullets will be positioned relatively to whole width/height of the column, rather then the portion that is currently visible.
    • "depthX" (depth0, depth1, etc.) tags added to Hierarchy Nodes. This allows targeting node items via theme rules by the level.
    • Dataviz, Kelly, Moonrise, Frozen, Material and Spirited themes added.
    • seriesTooltipTarget setting added to XYSeries (possible values: "series" (default) and "bullet"). If set to "bullet", first bullet of a data item will be used for as a tooltip target, making it inherit bullet's color rather than series.
    • New chart type: Venn.
    • New chart type: WordCloud.
    • New axis type: DurationAxis.
    • New formatter type: DurationFormatter.
    • New Root element property: durationFormatter. Holds a global instance of DurationFormatter which is used by DurationAxis.
    • Annotator tool added to Exporting plugin.
    • It is now possible to pass a custom draw methods for classes like Rectangle, RoundedRectangle, Candlestick, etc. This allows implementing completely custom look for those elements.
    • shadow* settings are now available on Label as well.
    • arrangeTooltips (default: true) setting added to XYChart. If set to false will disable tooltip overlap check algo.
    • Wherever date or number format can be set (DateFormatter, NumberFormatter, DateAxis, ValueAxis, Exporting) it can now be set as Intl.DateTimeFormatOptions (for date format) or Intl.NumberFormatOptions (for number format) object in additional to string-based format.
    • New list type ListAutoDispose added.
    • Two new settings in Pattern: strokeDasharray and strokeDashoffset.
    • Graphics and Picture can now have shadows with additional settings: shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, and shadowOpacity.
    • New setting in ListTemplate: autoDispose (default: true). If set to true will dispose items removed from the list.
    • Root element now has publicly-accessible property: dom. Holds a reference to chart container (div).
    • New Entity setting: userData. Use it to store any kind of proprietary data with any object in amCharts 5 that extends Entity.
    • autoRotate and autoRotateAngle settings added to Bullet. Works on Flow and MapPointSeries (when MapPoint is attached to a MapLine).
    • PercentSeries, FlowNodes, and Hierarchy now have fillField setting. It can be used to specify slice/node fill color via data. If not set, colors will be assigned automatically from series' colors (ColorSet).
    • toFront() and toBack() methods added to Sprite.
    • "above" setting added to AxisDataItem. Allows putting AxisRange grid and fill elements above the series.
    • New setting ignoreFormatting for Label added. If set to true, it will ignore square-bracketed style blocks and will display text as it is.
    • areLinked() method added to LinkedHierarchy.
    • unlinkDataItems() method added to LinkedHierarchy.
    • Global function am5.disposeAllRootElements() added. Disposes all charts.
    • am5.registry.rootElements added which holds an array with instances of all active Root elements.
    • seriesGraphics property added to PictorialStackedSeries. It's a Graphics which shows svgPath shape under all slices. Useful when startLocation/endLocation is used to make slices not occupy whole shape area.
    • dynamic setting added to Bullet, for the bullets that need their sprite element redrawn when related series changes in any way.
    • ClockHand now supports negative radius value (distance from the target axis outer radius in pixels).
    • syncWithAxis added to ValueAxis. If enabled, will sync grid between the axes.
    • Star now supports inner radius set in percent.
    • AxisRendererCircular now supports negative radius values.
    • id setting to all entities. If set, will also appear in am5.registry.entitiesById.
    • show() and hide() methods of DataItem now accept duration param.
    • deltaPosition added to data item of a CategoryAxis. Can be used for sorting series columns without modifying data order.
    • resetExtremes() method added to XYSeries. Resets series extremes to undefined. Can be used when values of a series are changed from outside.
    • New themeTagsSelf setting for Entity which is the same as themeTags except it doesn't apply to the children.
    • clipBack setting added to MapLineSeries.
  • Changed
    • baseRadius of RadialLabel can now accept Percent values. Previously this property was set internally, now user can set it to a number or percent value.
    • Upgraded to marker.js 2.16.2.
    • Annotator new setting: markerState. You can use it to pre-set annotations, or grab annotation data at any time.
    • Default text of an AxisLabel for CategoryAxis set to "{category}".
    • All MapChart-related zoom methods will now return Animation object.
    • A function that returns a Bullet can choose to return nothing, effectively ommitting bullet for the data item.
    • Picture elements will no inherit interactivity from its parents. If image needs to be interactive it needs to be set so directly via interactive setting.
    • Picture will now use source file's dimensions if neither width and height is set, and will also maintain aspect ratio if just one from width or height is set.
    • Scrollbar grip buttons will now have exportable: false set by default, so that they are not exported to chart snapshots.
    • WordCloud words are now sorted by value if data was set using series.data.
    • XYSeries will now automatically set the first bullet of a data item as the series' tooltipTarget. This will make the series tooltip background to change color to the bullet's fill.
    • Bullets on a ColumnSeries are now positioned vertically relative to visible part of the column, not the whole column.
    • Exporting plugin now imports minified version of xlsx library for XSLX data exports.
    • Axis tooltips have now animationDuration: 200 set automatically by Animated theme, so there's no need to set it in code anymore.
    • Axis will automatically add relative themeTags (e.g. "axis", "y", etc.) to a Tooltip when it is added. Setting themeTags manually is not required anymore.
    • XYCursor will now ignore mouse movement if chart is obstructed by other element, unless zoomin/panning.
    • series, xAxes, and yAxes on an XYChart are now ListAutoDispose, which means that removing items from those lists will automatically dispose them. Set autoDispose = false on those lists if you are planning on removing and reusing items.
    • width and height settings in Pattern are now optional.
    • Series axis range will now have visible: false set for all axis elements (grid, fill, label, tick) by default. If you need to enable them, set visible: true on a respective range element.
    • Sankey bullets will now check locationY if series is vertical, and locationX of its a horizontal series. It was using positionY for all orientations previously.
    • The way values of nodes in Hierarchy is counted updated to be consistent. There are two options now: a) set values on lowest nodes (no children) so that each node's value is a sum of all its descendants; b) set values for each node. Using any other approach might produce unpredictable results.
    • colors of the PercentSeries, FlowNodes, and Hierarchy will be reset every time new data is set.
    • maxPanOut of MapChart is temporarily disabled until we figure out proper behavior for it.
    • Default for Treemap setting layoutAlgorithm changed to "squarify".
    • Providing value in Hierarchy node's data will override sum of its children (except for Pack).
    • If legend items container toggle key is set to "none", clicking on the legend item will not do anything now.
    • In MapLineSeries, if a data item had pointsToConnect set, map line now first looks at the point's longitude/latitude setting and then at the geometry.
    • When a template state is changed, it now automatically updates related Entity's state as well.
    • fill and stroke settings moved from XYSeries to Series, so that all series like MapSeries could be shown in Legend.
    • Text of a tooltip text will now adaptively change color based on current background color.
    • Tooltips and Cursor are now exportable: false by default (meaning they won't be included in exported images).