Putting labels on a path, bending circular labels, and more in amCharts 4.1.2
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. pathlocationOnPathLabel
See the Pen Label on a path by amCharts team (@amcharts) on CodePen.
You can take it to the next level and animate the label to move along the graph’s path:
See the Pen Funky text on a path by amCharts team (@amcharts) on CodePen.
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:
See the Pen Bent circular labels by amCharts team (@amcharts) on CodePen.
Other additions, changes and fixes
Here’s what else is new in amCharts 4.1.1 and 4.1.2:
Added
New Spriteproperty strokeDashoffsetadded . Can be used in conjunctionwith strokeDasharray. Labelhas two new properties:pathand locationOnPath. If set, will layout the SVG text along a curvature of the SVG path. HTML and multi-line text is not supported.AxisLabelCircularnewproperty bentadded . If setto true, the label will be bent to follow the curvature of the circle. Distance from the circle can be adjustedusing radiusand label.paddingBottom. For PieSeriesthe alignLabels need to to be setto falsefor this feature to work.keepSelectionadded toValueAxis(will work on DateAxis too). With this setto true, axis will keep the relative selection when data changes (is updated). This is useful for “pre-zooming” a date axis: just setit’s startproperty (e.g.axis.start = 0.8).
Changed
If ValueAxishas strictMinMax = trueset but minand maxare 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 happen when
disposing chart/changing data in some cases. - Gantt chart sometimes was not displaying
first /last data item. - Newly
added MapLineelements were notrespecting nonScalingStroke = 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 examplein examples/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.