Just released amCharts 4.1.2 includes a few new awesome features in addition to fixes and improvements.
Labels on a path
Now you can put a label right on the series path and it will bend as the graph curvature bends. This is done using the new path and locationOnPath properties of the Label. Here’s a simple example:
You can take it to the next level and animate the label to move along the graph’s path:
Bent circular labels
You can now use a boolean bent property on the AxisLabelCircular to bend the label along the shape of a circular chart:
Other additions, changes and fixes
Here’s what else is new in amCharts 4.1.1 and 4.1.2:
Added
- New
SpritepropertystrokeDashoffsetadded. Can be used in conjunction withstrokeDasharray. Labelhas two new properties:pathandlocationOnPath. If set, will layout the SVG text along a curvature of the SVG path. HTML and multi-line text is not supported.AxisLabelCircularnew propertybentadded. If set totrue, the label will be bent to follow the curvature of the circle. Distance from the circle can be adjusted usingradiusandlabel.paddingBottom. ForPieSeriesthe alignLabels need to be set tofalsefor this feature to work.keepSelectionadded toValueAxis(will work on DateAxis too). With this set totrue, axis will keep the relative selection when data changes (is updated). This is useful for “pre-zooming” a date axis: just set itsstartproperty (e.g.axis.start = 0.8).
Changed
- If
ValueAxishasstrictMinMax = trueset butminandmaxare not set, axis will fix the min and max and real high/low values.
Fixed
- JSON: Having property values with both percent and minus signs in them, was resulting in error.
- “Z” code in
DateFormatterwas not taking UTC setting into account. - Exporting SVG with Unicode characters in Edge/IE was resulting in invalid SVG.
- Fixed JavaScript error which used to happen when disposing chart/changing data in some cases.
- Gantt chart sometimes was not displaying first/last data item.
- Newly added
MapLineelements were not respectingnonScalingStroke = trueuntil zoom level changed. - Series’ tooltip was not always visible with
DateAxis. cursorTooltipDisabled = truewas not working properly in some cases.- Sometimes duplicate
MapLineObjectsused to appear on map lines. - Some fixes made so that vertically and horizontally stacked axes on
XYChartare now possible. Check new example inexamples/vertically-stacked-axes.
Get the latest amCharts
As always, you can get the latest version of amCharts by following one of the methods outlined on our Download page.