I am using amCharts Version 5. How do i add labels along xAxis and y Axis . I am using ValueAxis ( in an XY Chart ) . Attached the image below for better understanding
I was able to find documentation about how to achieve it in V4 but not V5.
IN V4 :
valueAxis.title.text = "Turnover ($M)";
With amCharts 5, you can use the
Label
class which is introduced here: Labels – amCharts 5 DocumentationThe complete reference is there: Label – amCharts 5 Documentation
So what you have to do is simply creating one
Label
instance for each axis using thenew
method. I recommend you topush
an instance on yourxAxis.children
andunshift
another one on youryAxis.children
. If you usepush
every time, you may have a bit of extra work with positioning because of the natural order of axes' children.You will find an example below.